Classes

Hash

Methods

free()

free(): `void`

computeBlake2b()

`static` computeBlake2b(`data`): `Uint8Array`

Computes a 32-byte Blake2b hash from the input data.

Blake2b is used for example to compute a public key's address.

ParameterType
FirstUint8Array

computeNimiqArgon2d()

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

Computes an Argon2d hash with some Nimiq-specific parameters.

iterations specifies the number of iterations done in the hash function. It can be used to control the hash computation time. Increasing this will make it harder for an attacker to brute-force the password.

derived_key_length specifies the number of bytes that are output.

ParameterType
Firstnumber

computeNimiqArgon2id()

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

Computes an Argon2id hash with some Nimiq-specific parameters.

iterations specifies the number of iterations done in the hash function. It can be used to control the hash computation time. Increasing this will make it harder for an attacker to brute-force the password.

derived_key_length specifies the number of bytes that are output.

ParameterType
Firstnumber

computeSha256()

`static` computeSha256(`data`): `Uint8Array`

Computes a 32-byte SHA256 hash from the input data.

ParameterType
FirstUint8Array

computeSha512()

`static` computeSha512(`data`): `Uint8Array`

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

ParameterType
FirstUint8Array

On this page