js-databox
Version:
databox & metabox
14 lines (13 loc) • 525 B
TypeScript
declare class RSAEncrypt {
ab2str(buf: any): string;
str2ab(str: any): ArrayBuffer;
generateKey(): Promise<CryptoKeyPair>;
importPrivateKey(pem: any): Promise<CryptoKey>;
importPublicKey(pem: any): Promise<CryptoKey>;
exportCryptoKey(key: any): Promise<string>;
publicExportCryptoKey(key: any): Promise<string>;
encryptMessage(key: any, AESKey: any): Promise<string>;
decryptMessage(key: any, cipherText: any): Promise<string>;
}
export declare const RSAEncryptApi: RSAEncrypt;
export {};