A pure interface to SHA2
- data Length
- hash :: Hashable a => Length -> a -> ByteString
- hmac :: Hashable a => Length -> ByteString -> a -> ByteString
- showBSasHex :: ByteString -> String
Documentation
hash :: Hashable a => Length -> a -> ByteStringSource
Plain SHA2
:: 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