UNPKG

@iexec/dataprotector

Version:

This product enables users to confidentially store data–such as mail address, documents, personal information ...

30 lines (29 loc) 1.04 kB
/// <reference types="node" resolution-mode="require"/> export declare function getPemFormattedKeyPair({ pemPrivateKey, }: { pemPrivateKey?: string; }): Promise<{ pemPublicKey: string; pemPrivateKey: string; }>; export declare function formatPemPublicKeyForSMS(pemPublicKey: string): string; export declare function getOrGenerateKeyPair(): Promise<{ pemPublicKey: string; pemPrivateKey: string; }>; export declare function loadKeyPair(pem: string): Promise<{ pemPublicKey: string; pemPrivateKey: string; }>; export declare function generateKeyPair(): Promise<CryptoKeyPair>; export declare function getCrypto(): Promise<{ crypto: Crypto; CryptoKey: { new (): CryptoKey; prototype: CryptoKey; }; } | { crypto: import("crypto").webcrypto.Crypto; CryptoKey: import("crypto").webcrypto.CryptoKeyConstructor; }>; export declare function privateAsPem(privateKey: CryptoKey): Promise<string>; export declare function cryptoKeyPairFromPem(pemPrivateKey: string): Promise<CryptoKeyPair>;