Crypto-4.1.0: DES, Blowfish, AES, TEA, SHA1, MD5, RSA, BubbleBabble, Hexdump, Support for Word128, Word192 and Word256 and Beyond, PKCS5 Padding, Various Encryption Modes e.g. Cipher Block Chaining all in one package.Source codeContentsIndex
Data.HMAC
Contents
Function Types
Data Types
Description
Implements HMAC (hashed message authentication code) as defined in FIPS 198 http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf.
Synopsis
hmac :: HashMethod -> [Octet] -> [Octet] -> [Octet]
hmac_sha1 :: [Octet] -> [Octet] -> [Octet]
hmac_md5 :: [Octet] -> [Octet] -> [Octet]
data HashMethod = HashMethod {
digest :: [Octet] -> [Octet]
input_blocksize :: Int
}
Function Types
hmacSource
:: HashMethodHash 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_sha1Source
:: [Octet]Secret key
-> [Octet]Message text
-> [Octet]Resulting HMAC-SHA1 value
Compute an HMAC using SHA-1 as the underlying hash function.
hmac_md5Source
:: [Octet]Secret key
-> [Octet]Message text
-> [Octet]Resulting HMAC-SHA1 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
digest :: [Octet] -> [Octet]An arbitrary hash function
input_blocksize :: IntBit size of an input block to the hash function
Produced by Haddock version 2.1.0