nano-hmac-0.2.0: Bindings to OpenSSL HMAC.

Portabilityrequires FFI
Stabilityexperimental
MaintainerHitesh Jasani <hitesh.jasani@gmail.com>

Data.Digest.OpenSSL.HMAC

Description

Created : 2008-02-03

Bindings to OpenSSL HMAC.

Sample Usage:

 d <- hmac md5 myKey myMessage
 putStrLn d

 "e9139d1e6ee064ef8cf514fc7dc83e86"

Synopsis

Documentation

hmacSource

Arguments

:: CryptoHashFunction

hashing function

-> ByteString

key

-> ByteString

message

-> IO String

resulting HMAC

Generate an HMAC

This implementation is safe and will copy the ByteStrings.

unsafeHMACSource

Arguments

:: CryptoHashFunction

hashing function

-> ByteString

key

-> ByteString

message

-> String

resulting HMAC

Generate an HMAC

This implementation is will not copy the ByteStrings and uses unsafePerformIO