crypto-sodium-0.0.5.0: Easy-and-safe-to-use high-level cryptography based on Sodium
Safe HaskellNone
LanguageHaskell2010

Crypto.Sodium.Hash.Internal

Description

Internals of crypto_generichash.

Synopsis

Documentation

type HashBlake2b len a = SizedByteArray len a Source #

Hash returned by blake2b.

This type is parametrised by hash size in bytes and the actual data type that contains bytes. This can be, for example, a ByteString.

Length must be between 16 and 64 bytes.

blake2b Source #

Arguments

:: forall len hashBytes pt key. (ByteArrayAccess pt, ByteArrayAccess key, ByteArray hashBytes, KnownNat len, CRYPTO_GENERICHASH_BYTES_MIN <= len, len <= CRYPTO_GENERICHASH_BYTES_MAX) 
=> Maybe key

Hash key

-> pt

Message to hash

-> IO (HashBlake2b len hashBytes) 

Hash a message using BLAKE2b.