[][src]Function tox_crypto::crypto_init

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

Run before using crypto.

Runs sodiumoxide::init().

Returns Ok on success, Err otherwise.

E.g.

use tox_crypto::crypto_init;

crypto_init().unwrap();
// second call should yield same result
crypto_init().unwrap();