cryptohash 0.11.3 → 0.11.4
raw patch · 2 files changed
+7/−3 lines, 2 files
Files
- Crypto/MAC/HMAC.hs +6/−2
- cryptohash.cabal +1/−1
Crypto/MAC/HMAC.hs view
@@ -6,7 +6,7 @@ -- Portability : unknown -- -- provide the HMAC (Hash based Message Authentification Code) base algorithm.--- http://en.wikipedia.org/wiki/HMAC+-- <http://en.wikipedia.org/wiki/HMAC> -- module Crypto.MAC.HMAC ( hmac@@ -17,7 +17,11 @@ import Data.Bits (xor) -- | compute a MAC using the supplied hashing function-hmac :: (ByteString -> ByteString) -> Int -> ByteString -> ByteString -> ByteString+hmac :: (ByteString -> ByteString) -- ^ hash function+ -> Int -- ^ block size+ -> ByteString -- ^ secret+ -> ByteString -- ^ message+ -> ByteString hmac hashF blockSize secret msg = hashF $ B.append opad (hashF $ B.append ipad msg) where opad = B.map (xor 0x5c) k' ipad = B.map (xor 0x36) k'
cryptohash.cabal view
@@ -1,5 +1,5 @@ Name: cryptohash-Version: 0.11.3+Version: 0.11.4 Description: A collection of crypto hashes, with a practical incremental and one-pass, pure APIs, with performance close to the fastest implementations available in other languages.