packages feed

cryptonite-openssl 0.4 → 0.5

raw patch · 2 files changed

+17/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Crypto.OpenSSL.Random: randBytes :: ByteArray byteArray => Int -> IO byteArray

Files

+ Crypto/OpenSSL/Random.hs view
@@ -0,0 +1,15 @@+module Crypto.OpenSSL.Random+    ( randBytes+    ) where++import           Foreign.C.Types+import           Crypto.OpenSSL.Misc+import           Foreign.Ptr+import qualified Data.ByteArray as B++randBytes :: B.ByteArray byteArray => Int -> IO byteArray+randBytes n = B.alloc n $ \ptr ->+    check $ openssl_rand_bytes ptr (fromIntegral n)++foreign import ccall unsafe "RAND_bytes"+    openssl_rand_bytes :: Ptr CUChar -> CInt -> IO CInt
cryptonite-openssl.cabal view
@@ -1,5 +1,5 @@ Name:                cryptonite-openssl-Version:             0.4+Version:             0.5 Synopsis:            Crypto stuff using OpenSSL cryptographic library Description:         cryptography License:             BSD3@@ -24,6 +24,7 @@                      Crypto.OpenSSL.ECC                      Crypto.OpenSSL.BN                      Crypto.OpenSSL.AES+                     Crypto.OpenSSL.Random   Other-modules:     Crypto.OpenSSL.ECC.Foreign                    , Crypto.OpenSSL.BN.Foreign                    , Crypto.OpenSSL.AES.Foreign