UNPKG

ephy-rsa

Version:

A hybrid RSA + AES encryption service using jose for large data encryption on the browser.

17 lines (16 loc) 753 B
declare class RSAKeyService { private static instance; private privateKey; private publicKey; private initialized; private algorithm; private constructor(); static getInstance(algorithm?: RsaHashedKeyGenParams): Promise<RSAKeyService>; private generateKeys; getPublicKey(): string | null; encryptWithServerPublicKey(data: string, jwkPublicKey: JsonWebKey | string, // Accepts both JWK and PEM/Base64 alg?: "RSA-OAEP" | "RSA-OAEP-256" | "RSA-OAEP-384" | "RSA-OAEP-512", enc?: "A128GCM" | "A192GCM" | "A256GCM"): Promise<string>; decryptWithPrivateKey(encryptedData: string): Promise<string>; } declare const _default: (algorithm?: RsaHashedKeyGenParams) => Promise<RSAKeyService>; export default _default;