pbkdf2.d.ts 696 B

12345678910111213141516
  1. import { CHash, Input } from './utils.js';
  2. export type Pbkdf2Opt = {
  3. c: number;
  4. dkLen?: number;
  5. asyncTick?: number;
  6. };
  7. /**
  8. * PBKDF2-HMAC: RFC 2898 key derivation function
  9. * @param hash - hash function that would be used e.g. sha256
  10. * @param password - password from which a derived key is generated
  11. * @param salt - cryptographic salt
  12. * @param opts - {c, dkLen} where c is work factor and dkLen is output message size
  13. */
  14. export declare function pbkdf2(hash: CHash, password: Input, salt: Input, opts: Pbkdf2Opt): Uint8Array;
  15. export declare function pbkdf2Async(hash: CHash, password: Input, salt: Input, opts: Pbkdf2Opt): Promise<Uint8Array>;
  16. //# sourceMappingURL=pbkdf2.d.ts.map