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

Crypto.Init

Description

Libsodium initialisation.

Synopsis

Documentation

sodiumInit :: IO () Source #

Initialise libsodium.

This is just sodium_init() from libsodium. Calling it before using any Sodium functions is optional, but strongly recommended.

This function does the following:

  1. Open /dev/urandom (on Unix) to make it accessible even after chroot().
  2. Make all libsodium functions thread-safe.
  3. Benchmark different implementations of cryptographic primitives provided and choose the best ones.

This function itself is thread-safe (since libsodium-1.0.11).