///
declare type coseMap = Map;
declare type jwk = {
kty?: string;
use?: string;
key_ops?: string[];
alg?: string;
kid?: string;
x5u?: string;
x5c?: string[];
x5t?: string;
'x5t#S256'?: string;
crv?: string;
x?: string;
y?: string;
d?: string;
n?: string;
e?: string;
p?: string;
q?: string;
dp?: string;
dq?: string;
qi?: string;
oth?: {
r?: string;
d?: string;
t?: string;
}[];
k?: string;
ext?: boolean;
[key: string]: unknown;
};
declare type pem = string;
/**
* Verify data using signature and key(COSE, JWK or PEM).
*/
declare class Verifier {
private constructor();
/**
* Verify data using signature and COSE key.
*
* @param data verification content
* @param signature calculated signature for data
* @param key public key
* @returns Validity of signature
* @throws {@link KeyParseError} if COSE key is imperfect
*/
static verifyWithCOSEKey(data: Buffer, signature: Buffer, key: coseMap): Promise;
/**
* Verify data using signature and JWK.
*
* @param data verification content
* @param signature calculated signature for data
* @param key public key
* @returns Validity of signature
* @throws {@link KeyParseError} if JWK is imperfect
*/
static verifyWithJWK(data: Buffer, signature: Buffer, key: jwk): Promise;
/**
* Verify data using signature and PEM.
*
* @param data verification content
* @param signature calculated signature for data
* @param key public key
* @returns Validity of signature
*/
static verifyWithPEM(data: Buffer, signature: Buffer, key: pem, algorithm: string, hashAlgorithm?: string): boolean;
}
export default Verifier;