| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Crypto.Hash.Tsuraan.Blake2.Serial
- 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.
Arguments
| :: ByteString | Desired hashing key |
| -> Int | Desired digest size |
| -> IO Ctx |
Create a hashing context for key-based hashing.
Arguments
| :: Ctx | Hashing context |
| -> ByteString | Data to add to the hash |
| -> IO () |
Add more data to the hash.
Arguments
| :: Ctx | Hashing context |
| -> IO ByteString |
Finish hashing. This returns the digest of all the data that's been given
to the update function.
Arguments
| :: 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.
Arguments
| :: 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.