Function dryoc::classic::crypto_generichash::crypto_generichash
source · pub fn crypto_generichash(
output: &mut [u8],
input: &[u8],
key: Option<&[u8]>
) -> Result<(), Error>Expand description
Computes a hash from input and key, copying the result into output.
| Parameter | Typical length | Minimum length | Maximum length |
|---|---|---|---|
output | CRYPTO_GENERICHASH_BYTES | CRYPTO_GENERICHASH_BYTES_MIN | CRYPTO_GENERICHASH_BYTES_MAX |
key | CRYPTO_GENERICHASH_KEYBYTES | CRYPTO_GENERICHASH_KEYBYTES_MIN | CRYPTO_GENERICHASH_KEYBYTES_MAX |
Compatible with libsodium’s crypto_generichash_final