random-bytestring-0.1.3: Efficient generation of random bytestrings

Copyright(c) Lars Kuhtz <lakuhtz@gmail.com> 2017
LicenseMIT
Maintainerlakuhtz@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.ByteString.Random.Internal

Description

 

Synopsis

Documentation

generate Source #

Arguments

:: RandomWords g 
=> g

PRNG

-> Natural

Length of the result bytestring in bytes

-> IO ByteString 

Generates uniformily distributed random bytestrings of length n using the given PRNG.

class RandomWords g where Source #

Minimal complete definition

uniformW8, uniformW64

Methods

uniformW8 Source #

Arguments

:: g 
-> IO Word8

function that generates uniformily distributed random 8 bit words

uniformW64 Source #

Arguments

:: g 
-> IO Word64

function that generates uniformily distributed random 64 bit words