pbkdf

Pure Haskell password-based KDF (docs.ppad.tech/pbkdf).
git clone git://git.ppad.tech/pbkdf.git
Log | Files | Refs | README | LICENSE

commit 7ae375f48b7d1695b43e7386ded22787bd840cd7
parent 92948cd21a957a928710aa05cb51cdee9d0a912c
Author: Jared Tobin <jared@jtobin.io>
Date:   Mon, 24 Feb 2025 11:28:17 +0400

lib: fix off-by-one error

Diffstat:
Mlib/Crypto/KDF/PBKDF.hs | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/Crypto/KDF/PBKDF.hs b/lib/Crypto/KDF/PBKDF.hs @@ -42,6 +42,7 @@ xor :: BS.ByteString -> BS.ByteString -> BS.ByteString xor = BS.packZipWith B.xor {-# INLINE xor #-} +-- pbkdf2 derive :: HMAC -- ^ HMAC function -> BS.ByteString -- ^ password @@ -69,7 +70,7 @@ derive prf p s c dklen org = prf p (s <> ser32 i) - in go 0 org org + in go 1 org org {-# INLINE f #-} loop !acc !i