Skip to content

pbkdf2Hmac

pbkdf2Hmac(hashName: string, password: string | Uint8Array<ArrayBufferLike>, salt: string | Uint8Array<ArrayBufferLike>, iterations: number, dklen: number): Promise<Uint8Array<ArrayBufferLike>>

Defined in: packages/pythonlib/src/hashlib.ts:324

Compute PBKDF2 key derivation. Note: This is async to support Web Crypto API.

Parameters

ParameterTypeDescription
hashNamestringName of the hash algorithm
passwordstring | Uint8Array<ArrayBufferLike>Password bytes
saltstring | Uint8Array<ArrayBufferLike>Salt bytes
iterationsnumberNumber of iterations
dklennumberDerived key length in bytes

Returns

Promise<Uint8Array<ArrayBufferLike>>

Derived key as Uint8Array