pwstore-purehaskell 2.0 → 2.1
raw patch · 3 files changed
+13/−7 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Crypto.PasswordStore: exportSalt :: Salt -> ByteString
Files
- Crypto/PasswordStore.hs +11/−5
- README.md +1/−1
- pwstore-purehaskell.cabal +1/−1
Crypto/PasswordStore.hs view
@@ -80,9 +80,10 @@ -- * Utilities Salt, isPasswordFormatValid, -- :: ByteString -> Bool- genSaltIO, -- :: IO ByteString- genSaltRandom, -- :: (RandomGen b) => b -> (ByteString, b)- makeSalt -- :: ByteString -> Salt+ genSaltIO, -- :: IO Salt+ genSaltRandom, -- :: (RandomGen b) => b -> (Salt, b)+ makeSalt, -- :: ByteString -> Salt+ exportSalt -- :: Salt -> ByteString ) where import qualified Data.Digest.Pure.SHA as H@@ -169,8 +170,8 @@ -- | Hash a password with a given strength (12 is a good default). The output of -- this function can be written directly to a password file or -- database. Generates a salt using high-quality randomness from--- @\/dev\/urandom@ or (if that is not available) 'System.Random', which is--- included in the hashed output.+-- @\/dev\/urandom@ or (if that is not available, for example on Windows)+-- 'System.Random', which is included in the hashed output. makePassword :: ByteString -> Int -> IO ByteString makePassword password strength = do salt <- genSaltIO@@ -244,6 +245,11 @@ where check_length salt | B.length salt < 8 = error "Salt too short. Minimum length is 8 characters." | otherwise = salt++-- | Convert a 'Salt' into a 'ByteString'. The resulting 'ByteString' will be+-- base64-encoded. Most users will not need to use this function.+exportSalt :: Salt -> ByteString+exportSalt (SaltBS bs) = bs -- | Is the format of a password hash valid? Attempts to parse a given password -- hash. Returns 'True' if it parses correctly, and 'False' otherwise.
README.md view
@@ -17,7 +17,7 @@ cabal-install pwstore-fast -[Haddoc docs are here.](http://hackage.haskell.org/packages/archive/pwstore-fast/1.0/doc/html/Crypto-PasswordStore.html)+[Haddoc docs are here.](http://hackage.haskell.org/packages/archive/pwstore-fast/2.0/doc/html/Crypto-PasswordStore.html) Usage
pwstore-purehaskell.cabal view
@@ -1,5 +1,5 @@ Name: pwstore-purehaskell-Version: 2.0+Version: 2.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