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

Crypto.Hash.BLAKE2.BLAKE2bp

Description

 
Synopsis

Types

type BLAKE2bpState = ForeignPtr BLAKE2bpStruct Source #

The hash state.

Functions

initialize Source #

Arguments

:: Int

Output length in bytes

-> BLAKE2bpState 

Create a new hashing state.

initialize' Source #

Arguments

:: Int

Output length in bytes

-> ByteString

Key

-> BLAKE2bpState 

Create a new keyed hashing state.

update Source #

Arguments

:: ByteString

Data to hash

-> BLAKE2bpState

Hashing state

-> BLAKE2bpState 

Add data to the hashing state.

finalize Source #

Arguments

:: Int

Output length in bytes

-> BLAKE2bpState

Hashing state

-> ByteString 

Finalize the hashing state.

hash Source #

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.