Function rust_sodium::init [] [src]

pub fn init() -> Result<(), ()>

Initialises libsodium and chooses faster versions of the primitives if possible. Also makes the random number generation functions (gen_key, gen_keypair, gen_nonce, randombytes, randombytes_into) thread-safe.

init() returns Ok if initialisation succeeded and Err if it failed.