Struct secretbox::SecretBox [−][src]
pub struct SecretBox { /* fields omitted */ }
👎 Deprecated since 0.1.3:
use the crypto_box crate instead.
Implementations
👎 Deprecated since 0.1.3: use the crypto_box crate instead.
👎 Deprecated since 0.1.3:
use the crypto_box crate instead.
Creates a new SecretBox instance
Returns None if the passed key is shorter than 32 bytes
pub fn from_random_key<R>(rng: &mut R, cipher: CipherType) -> (Self, [u8; 32]) where
R: Rng + CryptoRng,
👎 Deprecated since 0.1.3: use the crypto_box crate instead.
pub fn from_random_key<R>(rng: &mut R, cipher: CipherType) -> (Self, [u8; 32]) where
R: Rng + CryptoRng,
👎 Deprecated since 0.1.3:
use the crypto_box crate instead.
Creates a new SecretBox instance with a generated key
👎 Deprecated since 0.1.3: use the crypto_box crate instead.
👎 Deprecated since 0.1.3:
use the crypto_box crate instead.
This function returns an encrypted and authenticated copy of the message. The key and nonce pair must be unique for every message.
👎 Deprecated since 0.1.3: use the crypto_box crate instead.
👎 Deprecated since 0.1.3:
use the crypto_box crate instead.
This function works like the above, except that it automatically generates a unique nonce.
👎 Deprecated since 0.1.3: use the crypto_box crate instead.
👎 Deprecated since 0.1.3:
use the crypto_box crate instead.
This function works like unseal, except that it finds the nonce automatically.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SecretBox
impl UnwindSafe for SecretBox
Blanket Implementations
Mutably borrows from an owned value. Read more