HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleHsOpenSSL-0.11.7.10Haskell2010

OpenSSL.Random

PRNG services See http://www.openssl.org/docs/crypto/rand.html For random Integer generation, see OpenSSL.BN

  • 3 values
  • PackageHsOpenSSL-0.11.7.10
  • Exports3
  • LanguageHaskell2010
  • LicenceLicenseRef-PublicDomain
  • SourceRandom.hs

Random byte generation

3 declarations
valuerandBytes
  1. :: Int

    the number of bytes requested

  2. -> IO ByteString
#

Return a bytestring consisting of the given number of strongly random bytes

valueprandBytes
  1. :: Int

    the number of bytes requested

  2. -> IO ByteString
#

Return a bytestring consisting of the given number of pseudo random bytes

valueadd
  1. :: ByteString

    random data to be added to the pool

  2. -> Int

    the number of bits of entropy in the first argument

  3. -> IO ()
#

Add data to the entropy pool. It's safe to add sensitive information (e.g. user passwords etc) to the pool. Also, adding data with an entropy of 0 can never hurt.