SHA2-0.2.4: Fast, incremental SHA hashing for bytestrings

Codec.Digest.SHA

Description

A pure interface to SHA2

Synopsis

Documentation

data Length Source

Constructors

SHA256 
SHA384 
SHA512 

hash :: Hashable a => Length -> a -> ByteStringSource

Plain SHA2

hmacSource

Arguments

:: Hashable a 
=> Length

Desired size of the HMAC

-> ByteString

The shared secret key to use

-> a

Message to hash

-> ByteString 

SHA2-based HMAC, see http:en.wikipedia.orgwikiHMAC

If you're doing encryption and want to prevent attackers from changing your messages, you probably want this.

showBSasHex :: ByteString -> StringSource

Converts a ByteString to hexadeximal string format