nano-hmac-0.1.1: Bindings to OpenSSL HMAC.Source codeContentsIndex
Data.Digest.OpenSSL.HMAC
Portabilityrequires FFI
Stabilityexperimental
MaintainerHitesh Jasani <hitesh.jasani@gmail.com>
Description

Created : 2008-02-03

Bindings to OpenSSL HMAC.

Sample Usage:

 d <- hmac md5 myKey myMessage
 putStrLn d

 "e9139d1e6ee064ef8cf514fc7dc83e86"
Synopsis
hmac :: CryptoHashFunction -> ByteString -> ByteString -> IO String
unsafeHMAC :: CryptoHashFunction -> ByteString -> ByteString -> String
data CryptoHashFunction
md5 :: CryptoHashFunction
Documentation
hmacSource
:: CryptoHashFunctionhashing function
-> ByteStringkey
-> ByteStringmessage
-> IO Stringresulting HMAC

Generate an HMAC

This implementation is safe and will copy the ByteStrings.

unsafeHMACSource
:: CryptoHashFunctionhashing function
-> ByteStringkey
-> ByteStringmessage
-> Stringresulting HMAC

Generate an HMAC

This implementation is will not copy the ByteStrings and uses unsafePerformIO

data CryptoHashFunction Source
md5 :: CryptoHashFunctionSource
Produced by Haddock version 2.4.2