UNPKG

@meeco/cryppo

Version:

In-browser encryption and decryption. Clone of Ruby Cryppo

21 lines (20 loc) 837 B
/// <reference types="node" /> import { EncodingVersions } from '../encoding-versions'; import { EncryptionKey } from '../encryption-key'; import { CipherStrategy } from '../strategies'; interface IEncryptionOptions { iv: string; at: string; ad: string; } export declare function decryptWithKeyDerivedFromString({ serialized, passphrase, encodingVersion, }: { serialized: string; passphrase: string; encodingVersion?: EncodingVersions; }): Promise<Uint8Array | null>; export declare function decryptWithKey({ serialized, key, }: { serialized: string; key: EncryptionKey; }): Promise<Uint8Array | null>; export declare function decryptWithKeyUsingArtefacts(key: EncryptionKey, encryptedData: any, strategy: CipherStrategy, { iv, at, ad }: IEncryptionOptions): Buffer | null; export {};