Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Ctx
- init :: Int -> IO Ctx
- init_key :: ByteString -> Int -> IO Ctx
- update :: Ctx -> ByteString -> IO ()
- finalize :: Ctx -> IO ByteString
- hash :: Int -> ByteString -> ByteString
- hash_key :: ByteString -> Int -> ByteString -> ByteString
Documentation
Opaque type that tracks the Blake2 hashing state. The update and finalize functions mutate this context.
:: ByteString | Desired hashing key |
-> Int | Desired digest size |
-> IO Ctx |
Create a hashing context for key-based hashing.
:: Ctx | Hashing context |
-> ByteString | Data to add to the hash |
-> IO () |
Add more data to the hash.
:: Ctx | Hashing context |
-> IO ByteString |
Finish hashing. This returns the digest of all the data that's been given
to the update
function.
:: Int | The digest size to generate; must be 1-64 |
-> ByteString | The string to hash |
-> ByteString |
Hash a ByteString
into a digest ByteString
. This function always runs
in serial, which is faster for very small strings but slower as the strings
get larger.
:: ByteString | The key to hash with |
-> Int | The digest size to generate; must be 1-64 |
-> ByteString | The string to hash |
-> ByteString |
Hash a ByteString
into a digest ByteString
using a key. This function
always runs in serial, which is faster for very small strings but slower as
the strings get larger.