packages feed

RSA 2.3.0 → 2.3.1

raw patch · 2 files changed

+9/−5 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Codec.Crypto.RSA.Pure: instance GHC.Exception.Exception Codec.Crypto.RSA.Pure.RSAError
+ Codec.Crypto.RSA.Pure: instance GHC.Exception.Type.Exception Codec.Crypto.RSA.Pure.RSAError
- Codec.Crypto.RSA.Exceptions: data PrivateKey :: *
+ Codec.Crypto.RSA.Exceptions: data PrivateKey
- Codec.Crypto.RSA.Exceptions: data PublicKey :: *
+ Codec.Crypto.RSA.Exceptions: data PublicKey
- Codec.Crypto.RSA.Pure: data PrivateKey :: *
+ Codec.Crypto.RSA.Pure: data PrivateKey
- Codec.Crypto.RSA.Pure: data PublicKey :: *
+ Codec.Crypto.RSA.Pure: data PublicKey

Files

RSA.cabal view
@@ -1,6 +1,6 @@ name:       RSA category:   Cryptography, Codec-version:    2.3.0+version:    2.3.1 license:    BSD3 license-file: LICENSE author:     Adam Wick <awick@galois.com>@@ -35,6 +35,7 @@   type:           exitcode-stdio-1.0   Main-Is:        Test.hs   hs-source-dirs: src,.+  other-modules:  Codec.Crypto.RSA.Pure   build-depends:  base                       >= 4.6     && < 7.0,                   binary                     >  0.7     && < 1.0,                   bytestring                 >  0.8     && < 0.12,
Test.hs view
@@ -96,10 +96,13 @@  instance Arbitrary LargePrime where   arbitrary =-    do Right (g :: HashDRBG) <- (newGen . BSS.pack) `fmap` replicateM 4096 arbitrary-       case largeRandomPrime g 64 of-         Left _ -> fail "Large prime generation failure."-         Right (i, _) -> return (LP i)+    do seed <- BSS.pack `fmap` replicateM 4096 arbitrary+       case newGen seed of+        Left _ -> fail "DRBG initialization error."+        Right (g :: HashDRBG) ->+          case largeRandomPrime g 64 of+            Left _ -> fail "Large prime generation failure."+            Right (i, _) -> return (LP i)  data KeyPairIdx = KPI Int  deriving (Show)