Generic Hash
Functions
Link copied to clipboard
expect fun genericHash(message: UByteArray, requestedHashLength: Int = crypto_generichash_BYTES, key: UByteArray? = null): UByteArray
Request computing a hash of message, with a specific hash length and optional key. The specific hash length can be between crypto_generichash_blake2b_BYTES_MIN and crypto_generichash_blake2b_BYTES_MAX. If the key is provided it needs the hash will be different for each different key.
Link copied to clipboard
Feed the last chunk of message to the updateable hash object. This returns the actual hash.
Link copied to clipboard
expect fun genericHashInit(requestedHashLength: Int = crypto_generichash_BYTES, key: UByteArray? = null): GenericHashState
Prepare a Generic Hash State object that will be used to compute hash of data with arbitrary length. Secific hash length can be requested
Link copied to clipboard
Generate a key of length crypto_generichash_blake2b_KEYBYTES that can be used with the generic hash funciton
Link copied to clipboard
Feed another chunk of message to the updateable hash object