AES 0.2.8 → 0.2.9
raw patch · 3 files changed
+8/−6 lines, 3 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
- AES.cabal +1/−1
- Codec/Crypto/AES/Random.hs +3/−3
- Control/Monad/UnsafeIO.hs +4/−2
AES.cabal view
@@ -1,7 +1,7 @@ Name: AES Synopsis: Fast AES encryption/decryption for bytestrings Description: A zero-copy binding to Brian Gladman's AES implementation, including a copy of that implementation-Version: 0.2.8+Version: 0.2.9 License: BSD3 License-file: COPYING Copyright: Copyright (c) 2009 University of Tromsø
Codec/Crypto/AES/Random.hs view
@@ -1,5 +1,5 @@ -- | This module provides a cryptographically secure PRNG based on--- AES, reading the seed from /dev/random+-- AES, reading the seed from /dev/urandom module Codec.Crypto.AES.Random(randBytes,prandBytes,AESGen,newAESGen) where import Data.Serialize@@ -13,9 +13,9 @@ import qualified Data.ByteString as B import Data.List --- | Randomness from a system source of nonsense such as /dev/random+-- | Randomness from a system source of nonsense such as /dev/urandom randBytes :: Int -> IO B.ByteString-randBytes n = withFile "/dev/random" ReadMode $ \h -> B.hGet h n+randBytes n = withFile "/dev/urandom" ReadMode $ \h -> B.hGet h n {-# NOINLINE ctx #-} ctx :: MVar AESCtx
Control/Monad/UnsafeIO.hs view
@@ -2,7 +2,9 @@ module Control.Monad.UnsafeIO where import qualified Control.Monad.ST as S+import qualified Control.Monad.ST.Unsafe as SU import qualified Control.Monad.ST.Lazy as L+import qualified Control.Monad.ST.Lazy.Unsafe as LU import Control.Monad.Trans.Reader import Control.Monad.Trans.Writer import Control.Monad.Trans@@ -14,9 +16,9 @@ instance MonadUnsafeIO IO where liftUnsafeIO = id instance MonadUnsafeIO (S.ST s) where- liftUnsafeIO = S.unsafeIOToST+ liftUnsafeIO = SU.unsafeIOToST instance MonadUnsafeIO (L.ST s) where- liftUnsafeIO = L.unsafeIOToST+ liftUnsafeIO = LU.unsafeIOToST instance MonadUnsafeIO m => MonadUnsafeIO (ReaderT r m) where liftUnsafeIO = lift . liftUnsafeIO instance (Monoid w, MonadUnsafeIO m) => MonadUnsafeIO (WriterT w m) where