Class: CryptoUtils
Constructors
new CryptoUtils()
new CryptoUtils():
CryptoUtils
Returns
Methods
free()
free():
void
Returns
void
Defined in
@nimiq/core/types/wasm/web.d.ts:1120
computeHmacSha512()
static
computeHmacSha512(key
,data
):Uint8Array
Computes a 64-byte HMAC-SHA512 hash from the input key and data.
Parameters
key
Uint8Array
data
Uint8Array
Returns
Uint8Array
Defined in
@nimiq/core/types/wasm/web.d.ts:1135
computePBKDF2sha512()
static
computePBKDF2sha512(password
,salt
,iterations
,derived_key_length
):Uint8Array
Computes a PBKDF2-over-SHA512 key from the password with the given parameters.
Parameters
password
Uint8Array
salt
Uint8Array
iterations
number
derived_key_length
number
Returns
Uint8Array
Defined in
@nimiq/core/types/wasm/web.d.ts:1146
getRandomValues()
static
getRandomValues(length
):Uint8Array
Generates a secure random byte array of the given length.
Parameters
length
number
Returns
Uint8Array
Defined in
@nimiq/core/types/wasm/web.d.ts:1126
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.
Parameters
message
Uint8Array
key
Uint8Array
salt
Uint8Array
iterations
number
Returns
Promise
<Uint8Array
>
Defined in
@nimiq/core/types/wasm/web.d.ts:1159