Hello community, here is the log from the commit of package ghc-bcrypt for openSUSE:Factory checked in at 2016-10-22 13:19:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-bcrypt (Old) and /work/SRC/openSUSE:Factory/.ghc-bcrypt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-bcrypt" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-bcrypt/ghc-bcrypt.changes 2016-09-25 14:33:14.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-bcrypt.new/ghc-bcrypt.changes 2016-10-22 13:19:55.000000000 +0200 @@ -1,0 +2,5 @@ +Thu Sep 15 07:00:34 UTC 2016 - [email protected] + +- Update to version 0.0.9 revision 0 with cabal2obs. + +------------------------------------------------------------------- Old: ---- bcrypt-0.0.8.tar.gz New: ---- bcrypt-0.0.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-bcrypt.spec ++++++ --- /var/tmp/diff_new_pack.xedB2y/_old 2016-10-22 13:19:56.000000000 +0200 +++ /var/tmp/diff_new_pack.xedB2y/_new 2016-10-22 13:19:56.000000000 +0200 @@ -18,21 +18,20 @@ %global pkg_name bcrypt Name: ghc-%{pkg_name} -Version: 0.0.8 +Version: 0.0.9 Release: 0 Summary: Haskell bindings to the bcrypt password hash License: BSD-3-Clause -Group: System/Libraries +Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel -# Begin cabal-rpm deps: BuildRequires: ghc-bytestring-devel +BuildRequires: ghc-data-default-devel BuildRequires: ghc-entropy-devel BuildRequires: ghc-memory-devel BuildRequires: ghc-rpm-macros BuildRoot: %{_tmppath}/%{name}-%{version}-build -# End cabal-rpm deps %description Haskell bindings to the bcrypt password hash. @@ -66,15 +65,12 @@ %prep %setup -q -n %{pkg_name}-%{version} - %build %ghc_lib_build - %install %ghc_lib_install - %post devel %ghc_pkg_recache ++++++ bcrypt-0.0.8.tar.gz -> bcrypt-0.0.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcrypt-0.0.8/Crypto/BCrypt.hs new/bcrypt-0.0.9/Crypto/BCrypt.hs --- old/bcrypt-0.0.8/Crypto/BCrypt.hs 2015-12-31 09:46:37.000000000 +0100 +++ new/bcrypt-0.0.9/Crypto/BCrypt.hs 2016-05-01 05:24:43.000000000 +0200 @@ -1,4 +1,6 @@ {-# LANGUAGE ForeignFunctionInterface #-} +{-# LANGUAGE OverloadedStrings #-} + {- | A module for hashing passwords with bcrypt. >>> import Crypto.BCrypt @@ -16,7 +18,8 @@ -} module Crypto.BCrypt (HashingPolicy(..), hashPasswordUsingPolicy, validatePassword, fastBcryptHashingPolicy, slowerBcryptHashingPolicy, - hashUsesPolicy, hashPassword, genSalt, genSaltUsingPolicy) + hashUsesPolicy, hashPassword, genSalt, genSaltUsingPolicy, + defaultHashAlgorithm) where import Foreign @@ -27,6 +30,7 @@ import qualified System.IO.Unsafe as U import Control.Monad import Data.ByteArray (constEq) +import Data.Default import System.Entropy foreign import ccall "crypt_ra" c_crypt_ra :: CString -> CString -> Ptr CString -> Ptr CInt -> IO CString @@ -63,7 +67,15 @@ -- The default is $2y$ (compatible with other Openwall-based -- libraries). The most up-to-date version is $2b$. preferredHashAlgorithm :: BS.ByteString - } + } deriving (Show, Eq) + +instance Default HashingPolicy where + -- Slower hashing seems like a decent default. + def = slowerBcryptHashingPolicy + +-- | Default is compatible with other Openwall-based libraries. +defaultHashAlgorithm :: BS.ByteString +defaultHashAlgorithm = "$2y$" -- | Hashes a password, using a hashing policy. hashPasswordUsingPolicy :: HashingPolicy -> BS.ByteString -> IO (Maybe BS.ByteString) @@ -88,7 +100,7 @@ -- | A policy that allows passwords to be hashed reasonably quickly, but for that -- reason isn't suitable for high security applications. fastBcryptHashingPolicy :: HashingPolicy -fastBcryptHashingPolicy = HashingPolicy 4 (BS.pack "$2y$") +fastBcryptHashingPolicy = HashingPolicy 4 defaultHashAlgorithm -- | A policy which makes password hashing substantially slower than -- fastBcryptHashingPolicy, and so makes it more difficult for an adversary to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcrypt-0.0.8/bcrypt.cabal new/bcrypt-0.0.9/bcrypt.cabal --- old/bcrypt-0.0.8/bcrypt.cabal 2015-12-31 09:46:37.000000000 +0100 +++ new/bcrypt-0.0.9/bcrypt.cabal 2016-05-01 05:24:43.000000000 +0200 @@ -1,5 +1,5 @@ Name: bcrypt -Version: 0.0.8 +Version: 0.0.9 Cabal-Version: >= 1.6 Build-Type: Simple License: BSD3 @@ -24,10 +24,11 @@ exposed-modules: Crypto.BCrypt include-dirs: csrc c-sources: csrc/crypt_blowfish.c csrc/crypt_blowfish_wrapper.c csrc/crypt_gensalt.c - build-depends: bytestring >= 0.9, - entropy < 0.4, - base >= 3 && < 5, - memory >= 0.9 && < 1.0 + build-depends: base >= 3 && < 5 + , bytestring >= 0.9 + , data-default >= 0.6.0 + , entropy < 0.4 + , memory >= 0.9 && < 1.0 source-repository head type: git
