crypto-sodium-0.0.4.0: Easy-and-safe-to-use high-level cryptography based on Sodium
Safe HaskellNone
LanguageHaskell2010

Crypto.Random

Description

Generate cryptographically-secure random data.

Synopsis

Documentation

generate :: forall ba n. (ByteArray ba, KnownNat n) => IO (SizedByteArray n ba) Source #

Generate a sequence of cryptographically-secure random bytes.

The output of this function is suitable to generate secret keys.

Note: This function is not thread-safe until Sodium is initialised. See Crypto.Init for details.