blake2-0.3.0.1: A library providing BLAKE2
MaintainerJohn Galt <jgalt@centromere.net>
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Crypto.Hash.BLAKE2.BLAKE2b

Description

 
Synopsis

Types

type BLAKE2bState = ForeignPtr BLAKE2bStruct #

The hash state.

Functions

initialize #

Arguments

:: Int

Output length in bytes

-> BLAKE2bState 

Create a new hashing state.

initialize' #

Arguments

:: Int

Output length in bytes

-> ByteString

Key

-> BLAKE2bState 

Create a new keyed hashing state.

update #

Arguments

:: ByteString

Data to hash

-> BLAKE2bState

Hashing state

-> BLAKE2bState 

Add data to the hashing state.

finalize #

Arguments

:: Int

Output length in bytes

-> BLAKE2bState

Hashing state

-> ByteString 

Finalize the hashing state.

hash #

Arguments

:: Int

Output length in bytes

-> ByteString

Key

-> ByteString

Data to hash

-> ByteString 

Perform hashing all in one step. A common way of calling this function is hash 64 mempty dataToHash for applications which do not require keying.