-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A library providing BLAKE2 -- -- This library provides the BLAKE2 hash algorithms. @package blake2 @version 0.1.0 module Crypto.Hash.BLAKE2.Internal type InitFunc a = Ptr a -> Int -> IO CInt type InitKeyFunc a = Ptr a -> Word8 -> Ptr CChar -> Word8 -> IO CInt type UpdateFunc a = Ptr a -> Ptr Word8 -> Word64 -> IO CInt type FinalFunc a = Ptr a -> Ptr Word8 -> Word8 -> IO CInt type HashFunc = Ptr Word8 -> Ptr CChar -> Ptr CChar -> Word8 -> Word64 -> Word8 -> IO CInt initializer :: Storable a => InitFunc a -> Int -> ForeignPtr a initializer' :: Storable a => InitKeyFunc a -> Int -> ByteString -> ForeignPtr a updater :: Storable a => UpdateFunc a -> ByteString -> ForeignPtr a -> ForeignPtr a finalizer :: Storable a => FinalFunc a -> Int -> ForeignPtr a -> ByteString hasher :: HashFunc -> Int -> ByteString -> ByteString -> ByteString module Crypto.Hash.BLAKE2.BLAKE2bp -- | The hash state. type BLAKE2bpState = ForeignPtr BLAKE2bpStruct -- | Create a new hashing state. initialize :: Int -> BLAKE2bpState -- | Create a new keyed hashing state. initialize' :: Int -> ByteString -> BLAKE2bpState -- | Add data to the hashing state. update :: ByteString -> BLAKE2bpState -> BLAKE2bpState -- | Finalize the hashing state. finalize :: Int -> BLAKE2bpState -> ByteString -- | Perform hashing all in one step. hash :: Int -> ByteString -> ByteString -> ByteString instance Foreign.Storable.Storable Crypto.Hash.BLAKE2.BLAKE2bp.BLAKE2bpStruct module Crypto.Hash.BLAKE2.BLAKE2s -- | The hash state. type BLAKE2sState = ForeignPtr BLAKE2sStruct -- | Create a new hashing state. initialize :: Int -> BLAKE2sState -- | Create a new keyed hashing state. initialize' :: Int -> ByteString -> BLAKE2sState -- | Add data to the hashing state. update :: ByteString -> BLAKE2sState -> BLAKE2sState -- | Finalize the hashing state. finalize :: Int -> BLAKE2sState -> ByteString -- | Perform hashing all in one step. hash :: Int -> ByteString -> ByteString -> ByteString instance Foreign.Storable.Storable Crypto.Hash.BLAKE2.BLAKE2s.BLAKE2sStruct module Crypto.Hash.BLAKE2.BLAKE2sp -- | The hash state. type BLAKE2spState = ForeignPtr BLAKE2spStruct -- | Create a new hashing state. initialize :: Int -> BLAKE2spState -- | Create a new keyed hashing state. initialize' :: Int -> ByteString -> BLAKE2spState -- | Add data to the hashing state. update :: ByteString -> BLAKE2spState -> BLAKE2spState -- | Finalize the hashing state. finalize :: Int -> BLAKE2spState -> ByteString -- | Perform hashing all in one step. hash :: Int -> ByteString -> ByteString -> ByteString instance Foreign.Storable.Storable Crypto.Hash.BLAKE2.BLAKE2sp.BLAKE2spStruct module Crypto.Hash.BLAKE2.BLAKE2b -- | The hash state. type BLAKE2bState = ForeignPtr BLAKE2bStruct -- | Create a new hashing state. initialize :: Int -> BLAKE2bState -- | Create a new keyed hashing state. initialize' :: Int -> ByteString -> BLAKE2bState -- | Add data to the hashing state. update :: ByteString -> BLAKE2bState -> BLAKE2bState -- | Finalize the hashing state. finalize :: Int -> BLAKE2bState -> ByteString -- | Perform hashing all in one step. hash :: Int -> ByteString -> ByteString -> ByteString instance Foreign.Storable.Storable Crypto.Hash.BLAKE2.BLAKE2b.BLAKE2bStruct