UNPKG

@datadayrepos/libsodium-wrapper

Version:

Typescript for accessing the libsodium.js for a small subset of functionalities.

8 lines (7 loc) 397 B
export type KeyPairResult = { public: Uint8Array; private: Uint8Array; }; export declare function createCurve25519(): Promise<KeyPairResult>; export declare function encryptWithPublicKey(publicKey: Uint8Array, content: string): Promise<string>; export declare function decryptWithPrivateKey(privateKey: Uint8Array, publicKey: Uint8Array, encryptedContent: string): Promise<string | null>;