crypto-pbkdf2-hmac
Version:
Isomorphic wrapper for the PBKDF2-HMAC key derivation function.
28 lines (27 loc) • 2.02 kB
TypeScript
declare const pbkdf2: {
sha1: {
(password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number): Promise<string>;
buffer: (password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number) => Promise<ArrayBuffer>;
hex: /*elided*/ any;
uint8: (password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number) => Promise<Uint8Array>;
};
sha256: {
(password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number): Promise<string>;
buffer: (password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number) => Promise<ArrayBuffer>;
hex: /*elided*/ any;
uint8: (password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number) => Promise<Uint8Array>;
};
sha384: {
(password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number): Promise<string>;
buffer: (password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number) => Promise<ArrayBuffer>;
hex: /*elided*/ any;
uint8: (password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number) => Promise<Uint8Array>;
};
sha512: {
(password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number): Promise<string>;
buffer: (password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number) => Promise<ArrayBuffer>;
hex: /*elided*/ any;
uint8: (password: CryptoKey | Uint8Array | string, salt: Uint8Array | string, iterations: number, bytesLength: number) => Promise<Uint8Array>;
};
};
export default pbkdf2;