Skip to content

libsodium.GenericHash

Andrew Lambert edited this page Nov 26, 2022 · 6 revisions

libsodium.GenericHash

Method Signature

 Protected Function GenericHash(InputData As MemoryBlock, Key As MemoryBlock = Nil, HashSize As UInt32 = libsodium.crypto_generichash_BYTES_MAX) As String

Parameters

Name Type Comment
InputData MemoryBlock The data to be hashed.
Key MemoryBlock Optional. The key for keyed hashing.
HashSize UInt32 Optional. The size of the hash output, in bytes.

Return value

The hash value, or Nil on error.

Remarks

Generates a BLAKE2b digest of the InputData, optionally using the specified key. The Key is typically a SecretKey or SharedSecret. HashSize must be >=32 and <=64 bytes; the default is 64 bytes.

See also

Clone this wiki locally