SHA2-0.2.1: Fast, incremental SHA hashing for bytestringsSource codeContentsIndex
Codec.Digest.SHA
Description
A pure interface to SHA2
Synopsis
data Length
= SHA256
| SHA384
| SHA512
hash :: Hashable a => Length -> a -> ByteString
hmac :: Hashable a => Length -> ByteString -> a -> ByteString
showBSasHex :: ByteString -> String
Documentation
data Length Source
Constructors
SHA256
SHA384
SHA512
hash :: Hashable a => Length -> a -> ByteStringSource
Plain SHA2
hmacSource
:: Hashable a
=> LengthThe shared secret key to use
-> ByteStringMessage to hash
-> a
-> 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
Produced by Haddock version 2.6.0