Portability | portable, GHC |
---|---|
Stability | experimental |
Maintainer | rrnewton@gmail.com |
This module bridges these three interfaces:
Crypto.Classes.BlockCipher Crypto.Random.CryptoRandomGen System.Random.RandomGen
Specifically, a block cipher can be converted to generate a
CryptoRandomGen
, which in turn can be converted to provide the
RandomGen
interface.
Documentation
data BCtoCRG a
A BlockCipher can generate random numbers. When lifting we include a counter which increments as random numbers are generated:
BCtoCRG a Word64 |
BlockCipher x => CryptoRandomGen (BCtoCRG x) |
convertCRG :: CryptoRandomGen g => g -> CRGtoRG g
The constructor for CRGtoRG values.