@sphereon/ssi-sdk-ext.x509-utils
Version:
Sphereon SSI-SDK plugin functions for X.509 Certificate handling.
24 lines • 863 B
TypeScript
import { HashAlgorithm, KeyVisibility } from '../types';
import { RSAEncryptionSchemes, RSASignatureSchemes } from './rsa-key';
export declare class RSASigner {
private readonly hashAlgorithm;
private readonly jwk;
private key;
private readonly scheme;
/**
*
* @param key Either in PEM or JWK format (no raw hex keys here!)
* @param opts The algorithm and signature/encryption schemes
*/
constructor(key: string | JsonWebKey, opts?: {
hashAlgorithm?: HashAlgorithm;
scheme?: RSAEncryptionSchemes | RSASignatureSchemes;
visibility?: KeyVisibility;
});
private getImportParams;
private getKey;
private bufferToString;
sign(data: Uint8Array): Promise<string>;
verify(data: string | Uint8Array, signature: string): Promise<boolean>;
}
//# sourceMappingURL=rsa-signer.d.ts.map