UNPKG

@meeco/cryppo

Version:

In-browser encryption and decryption. Clone of Ruby Cryppo

14 lines (13 loc) 612 B
import { EncryptionKey } from '../encryption-key'; import { DerivedKeyOptions, IRandomKeyOptions } from './derived-key'; /** * Given a password/phrase, derive a fixed-length key from it using Pbkdf2Hmac. * Various derivation arguments can be provided to ensure deterministic results * (i.e. to derive the same key again from the same password/phrase). */ export declare function generateDerivedKey({ passphrase, length, minIterations, iterationVariance, useSalt, }: Partial<IRandomKeyOptions> & { passphrase: string; }): Promise<{ key: EncryptionKey; options: DerivedKeyOptions; }>;