Struct ring::aead::Nonce [−][src]
pub struct Nonce(_);
Expand description
A nonce for a single AEAD opening or sealing operation.
The user must ensure, for a particular key, that each nonce is unique.
Nonce intentionally doesn’t implement Clone to ensure that each one is
consumed at most once.
Implementations
impl Nonce[src]
impl Nonce[src]pub fn try_assume_unique_for_key(value: &[u8]) -> Result<Self, Unspecified>[src]
pub fn try_assume_unique_for_key(value: &[u8]) -> Result<Self, Unspecified>[src]Constructs a Nonce with the given value, assuming that the value is
unique for the lifetime of the key it is being used with.
Fails if value isn’t NONCE_LEN bytes long.
pub fn assume_unique_for_key(value: [u8; 12]) -> Self[src]
pub fn assume_unique_for_key(value: [u8; 12]) -> Self[src]Constructs a Nonce with the given value, assuming that the value is
unique for the lifetime of the key it is being used with.