Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internals of crypto_generichash
.
Synopsis
- type HashBlake2b len a = SizedByteArray len a
- blake2b :: 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 -> pt -> IO (HashBlake2b len hashBytes)
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.
:: 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.