UNPKG

@xevolab/jades

Version:

JAdES Digital Signatures compatible with the ETSI TS 119 182-1 Standard

22 lines (21 loc) 722 B
import { KeyObject } from 'crypto'; import type { SignAlg } from "../types"; /** * Returns the digest algorithm for the given signature algorithm. * * @param {string} alg The signature algorithm * * @return {string} The digest algorithm to be used */ export declare function digestAlg(alg: string): string; /** * Throw an error if the key is not valid for the given algorithm. * * @param {SignAlg} alg The signature algorithm * @param {KeyObject} key The key object * * @return {void} */ export declare function checkKeyType(alg: SignAlg, key: KeyObject): void; declare const calculateSignature: (alg: SignAlg, key: KeyObject, data: Buffer) => Buffer; export default calculateSignature;