Struct ring::aead::Nonce [−][src]
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]
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]
Constructs a Nonce with the given value, assuming that the value is
unique for the lifetime of the key it is being used with.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,