crypto-api 0.1.1.0 → 0.1.2.0
raw patch · 3 files changed
+7/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Crypto/Random.hs +3/−2
- System/Crypto/Random.hs +1/−1
- crypto-api.cabal +3/−1
Crypto/Random.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE ScopedTypeVariables, MonoLocalBinds, FlexibleInstances #-}+{-# LANGUAGE ScopedTypeVariables, MonoLocalBinds, FlexibleInstances,CPP #-} {-| Maintainer: Thomas.DuBuisson@gmail.com Stability: beta@@ -43,11 +43,12 @@ | NotEnoughEntropy -- ^ For instantiating new generators (or reseeding) deriving (Eq, Ord, Show) +#if !MIN_VERSION_base(4,3,0) instance Monad (Either GenError) where return = Right- fail = Left . GenErrorOther (Left x) >>= _ = Left x (Right x) >>= f = f x+#endif -- |A class of random bit generators that allows for the possibility of failure, -- reseeding, providing entropy at the same time as requesting bytes
System/Crypto/Random.hs view
@@ -22,7 +22,7 @@ import Data.ByteString.Lazy as L import Crypto.Types -#if defined(_WIN32) || defined (mingw32_HOST_OS) || defined(cygwin32_HOST_OS)+#if defined(isWindows) {- C example for windows rng - taken from a blog, can't recall which one but thank you! #include <Windows.h> #include <Wincrypt.h>
crypto-api.cabal view
@@ -1,5 +1,5 @@ name: crypto-api-version: 0.1.1.0+version: 0.1.2.0 license: BSD3 license-file: LICENSE copyright: Thomas DuBuisson <thomas.dubuisson@gmail.com>, Dominic Steinitz (see Data.LargeWord module)@@ -55,6 +55,8 @@ ghc-options: -O2 hs-source-dirs: exposed-modules: Crypto.Classes, Crypto.Types, Crypto.HMAC, Data.LargeWord, Crypto.Modes, System.Crypto.Random, Crypto.Random, Crypto.Padding+ if os(windows)+ CC-Options: -DisWindows if flag(tests) exposed-modules: Test.Crypto, Test.AES, Test.SHA, Test.HMAC, Test.ParseNistKATs, Test.TwoFish build-depends: QuickCheck >= 2.3 && < 2.4, directory >= 1.0.1.0 && < 1.1