From 480ff26a34f8c08f4ed29ae9b414f5a7a258a48b Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Wed, 23 Jul 2014 05:58:22 -0700 Subject: [PATCH] cleanup in PBKDF2 --- Crypto/KDF/PBKDF2.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Crypto/KDF/PBKDF2.hs b/Crypto/KDF/PBKDF2.hs index 4d76883..d643e99 100644 --- a/Crypto/KDF/PBKDF2.hs +++ b/Crypto/KDF/PBKDF2.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE BangPatterns #-} -- | -- Module : Crypto.KDF.PBKDF2 -- License : BSD-style @@ -8,6 +7,7 @@ -- -- Password Based Key Derivation Function 2 -- +{-# LANGUAGE BangPatterns #-} module Crypto.KDF.PBKDF2 ( PRF , prfHMAC @@ -44,10 +44,10 @@ prfHMAC alg k = hmacIncr alg (HMAC.initialize k) -- | Parameters for PBKDF2 data Parameters = Parameters - { password :: ByteString - , salt :: ByteString - , iterCounts :: Int - , outputLength :: Int + { password :: ByteString -- ^ Password (bytes encoded) + , salt :: ByteString -- ^ Salut (bytes encoded) + , iterCounts :: Int -- ^ the number of user-defined iterations for the algorithms. e.g. WPA2 uses 4000. + , outputLength :: Int -- ^ the number of bytes to generate out of PBKDF2 } -- | generate the pbkdf2 key derivation function from the output