Crypto-4.2.5.2: Common Cryptographic Algorithms in Pure Haskell
Copyright(c) Greg Heartsfield 2007
LicenseBSD-style (see the file ReadMe.tex)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.HMAC

Description

Implements HMAC (hashed message authentication code) as defined in FIPS 198 http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf.

Synopsis

Function Types

hmac Source #

Arguments

:: HashMethod

Hash function and associated block size

-> [Octet]

Secret key

-> [Octet]

Message text

-> [Octet]

Resulting HMAC value

Generalized function for creating HMACs on a specified hash function.

hmac_sha1 Source #

Arguments

:: [Octet]

Secret key

-> [Octet]

Message text

-> [Octet]

Resulting HMAC-SHA1 value

Compute an HMAC using SHA-1 as the underlying hash function.

hmac_md5 Source #

Arguments

:: [Octet]

Secret key

-> [Octet]

Message text

-> [Octet]

Resulting HMAC-MD5 value

Compute an HMAC using MD5 as the underlying hash function.

Data Types

data HashMethod Source #

HMAC works over any hash function, which is represented by HashMethod. A hash function and input block size must be specified.

Constructors

HashMethod 

Fields