git.iko.soy/typeable/entropy
on main help sign in
Cabal file twiddle, move posix import.
4e6984bThomas M. DuBuisson
System/Entropy.hs+1−1
@@ -19,7 +19,6 @@ module System.Entropy
19import Control.Monad (liftM)
19import Control.Monad (liftM)
20import Data.ByteString as B
20import Data.ByteString as B
21import System.IO.Error (mkIOError, eofErrorType, ioeSetErrorString)
21import System.IO.Error (mkIOError, eofErrorType, ioeSetErrorString)
22−import System.Posix (openFd, closeFd, fdReadBuf, OpenMode(..), defaultFileFlags, Fd)
23import Foreign (allocaBytes)
22import Foreign (allocaBytes)
24
23
25#if defined(isWindows)
24#if defined(isWindows)
@@ -150,6 +149,7 @@ hGetEntropy UseRdRand =
150
149
151#else
150#else
152{- Not windows, assuming nix with a /dev/urandom -}
151{- Not windows, assuming nix with a /dev/urandom -}
152+import System.Posix (openFd, closeFd, fdReadBuf, OpenMode(..), defaultFileFlags, Fd)
153import Foreign.Ptr
153import Foreign.Ptr
154
154
155source :: FilePath
155source :: FilePath
entropy.cabal+17−16
@@ -1,32 +1,33 @@
1name: entropy
1name: entropy
2−version: 0.2.2
2+version: 0.2.2.3
3−license: BSD3
4−license-file: LICENSE
5−copyright: Thomas DuBuisson <thomas.dubuisson@gmail.com>
6−author: Thomas DuBuisson <thomas.dubuisson@gmail.com>
7−maintainer: Thomas DuBuisson <thomas.dubuisson@gmail.com>
8description: A platform independent method to obtain cryptographically strong entropy
3description: A platform independent method to obtain cryptographically strong entropy
9 (urandom on Linux, CryptAPI on Windows, patches welcome).
4 (urandom on Linux, CryptAPI on Windows, patches welcome).
10 Users looking for cryptographically strong (number-theoretically
5 Users looking for cryptographically strong (number-theoretically
11 sound) PRNGs should see the 'DRBG' package too!
6 sound) PRNGs should see the 'DRBG' package too!
12synopsis: A platform independent entropy source
7synopsis: A platform independent entropy source
8+license: BSD3
9+license-file: LICENSE
10+copyright: Thomas DuBuisson <thomas.dubuisson@gmail.com>
11+author: Thomas DuBuisson <thomas.dubuisson@gmail.com>
12+maintainer: Thomas DuBuisson <thomas.dubuisson@gmail.com>
13category: Data, Cryptography
13category: Data, Cryptography
14homepage: https://github.com/TomMD/entropy
14homepage: https://github.com/TomMD/entropy
15bug-reports: https://github.com/TomMD/entropy/issues
15bug-reports: https://github.com/TomMD/entropy/issues
16stability: stable
16stability: stable
17−build-type: Custom
17+build-type: Custom
18−cabal-version: >= 1.6
18+cabal-version: >=1.10
19−tested-with: GHC == 6.12.1
19+tested-with: GHC == 7.6.3
20−data-files:
20+-- data-files:
21−extra-source-files: ./cbits/rdrand.c
21+extra-source-files: ./cbits/rdrand.c, ./cbits/rdrand.h, README.md
22− , ./cbits/rdrand.h
23
22
24−Library
23+library
25− Build-Depends: base == 4.*, bytestring
26 ghc-options: -Wall -O2
24 ghc-options: -Wall -O2
27− hs-source-dirs:
28 exposed-modules: System.Entropy
25 exposed-modules: System.Entropy
26+ other-extensions: CPP, ForeignFunctionInterface, BangPatterns, ScopedTypeVariables
27+ build-depends: base == 4.*, bytestring
28+ -- hs-source-dirs:
29− other-modules:
29+ -- other-modules:
30+ default-language: Haskell2010
30 if arch(x86_64)
31 if arch(x86_64)
31 cpp-options: -Darch_x86_64
32 cpp-options: -Darch_x86_64
32 c-sources: cbits/rdrand.c
33 c-sources: cbits/rdrand.c