packages feed

clientsession 0.9.0.2 → 0.9.0.3

raw patch · 2 files changed

+12/−3 lines, 2 filesdep +crypto-randomdep ~cprng-aesPVP ok

version bump matches the API change (PVP)

Dependencies added: crypto-random

Dependency ranges changed: cprng-aes

API changes (from Hackage documentation)

Files

clientsession.cabal view
@@ -1,5 +1,5 @@ name:            clientsession-version:         0.9.0.2+version:         0.9.0.3 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>, Felipe Lessa <felipe.lessa@gmail.com>@@ -32,6 +32,7 @@                    , entropy             >= 0.2.1                    , cprng-aes           >= 0.2                    , cipher-aes          >= 0.1.7+                   , crypto-random     exposed-modules: Web.ClientSession     ghc-options:     -Wall     hs-source-dirs:  src
src/Web/ClientSession.hs view
@@ -2,6 +2,7 @@ {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE CPP #-}+{-# LANGUAGE PackageImports #-} --------------------------------------------------------- -- -- |@@ -77,7 +78,7 @@  -- from crypto-api import Crypto.Classes (constTimeEq)-import Crypto.Random (genSeedLength, reseed)+import "crypto-api" Crypto.Random (genSeedLength, reseed) import Crypto.Types (ByteLength)  -- from cipher-aes@@ -90,7 +91,12 @@ import System.Entropy (getEntropy)  -- from cprng-aes+#if MIN_VERSION_cprng_aes(0,5,0)+import Crypto.Random.AESCtr (AESRNG, makeSystem)+import "crypto-random" Crypto.Random (cprgGenerate)+#else import Crypto.Random.AESCtr (AESRNG, makeSystem, genRandomBytes)+#endif   -- | The keys used to store the cookies.  We have an AES key used@@ -295,7 +301,9 @@ aesRNG = do   (bs, count) <-       I.atomicModifyIORef aesRef $ \(ASt rng count) ->-#if MIN_VERSION_cprng_aes(0, 3, 2)+#if MIN_VERSION_cprng_aes(0, 5, 0)+          let (bs', rng') = cprgGenerate 16 rng+#elif MIN_VERSION_cprng_aes(0, 3, 2)           let (bs', rng') = genRandomBytes 16 rng #else           let (bs', rng') = genRandomBytes rng 16