Classes

CryptoUtils

Methods

free()

free(): `void`

computeHmacSha512()

`static` computeHmacSha512(`key`, `data`): `Uint8Array`

Computes a 64-byte HMAC-SHA512 hash from the input key and data.

ParameterType
FirstUint8Array

computePBKDF2sha512()

`static` computePBKDF2sha512(`password`, `salt`, `iterations`, `derived_key_length`): `Uint8Array`

Computes a PBKDF2-over-SHA512 key from the password with the given parameters.

ParameterType
Firstnumber

getRandomValues()

`static` getRandomValues(`length`): `Uint8Array`

Generates a secure random byte array of the given length.

ParameterType
Firstnumber

otpKdf()

`static` otpKdf(`message`, `key`, `salt`, `iterations`): `Promise`\<`Uint8Array`\>

Encrypts a message with an OTP KDF and the given parameters. The KDF uses Argon2d for hashing.

ParameterType
Firstnumber
<Uint8Array>

On this page