pwstore-purehaskell 2.1 → 2.1.1
raw patch · 2 files changed
+5/−4 lines, 2 filesnew-uploaderPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Crypto/PasswordStore.hs +4/−3
- pwstore-purehaskell.cabal +1/−1
Crypto/PasswordStore.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} -- | -- Module : Crypto.PasswordStore -- Copyright : (c) Peter Scott, 2011@@ -94,6 +94,7 @@ import System.IO import System.Random import Data.Maybe+import Control.Exception as E --------------------- -- Cryptographic base@@ -124,7 +125,7 @@ -- system RNG as a fallback. This is the function used to generate salts by -- 'makePassword'. genSaltIO :: IO Salt-genSaltIO = catch genSaltDevURandom (\_ -> genSaltSysRandom)+genSaltIO = E.catch genSaltDevURandom (\(_::SomeException) -> genSaltSysRandom) -- | Generate a 'Salt' from @\/dev\/urandom@. genSaltDevURandom :: IO Salt@@ -242,7 +243,7 @@ -- this function. makeSalt :: ByteString -> Salt makeSalt = SaltBS . encode . check_length- where check_length salt | B.length salt < 8 = + where check_length salt | B.length salt < 8 = error "Salt too short. Minimum length is 8 characters." | otherwise = salt
pwstore-purehaskell.cabal view
@@ -1,5 +1,5 @@ Name: pwstore-purehaskell-Version: 2.1+Version: 2.1.1 Synopsis: Secure password storage, in pure Haskell. Description: To store passwords securely, they should be salted, then hashed with a slow hash function. This library