aws_lc_rs::aead

Struct OpeningKeyPreparedNonce

Source
pub struct OpeningKeyPreparedNonce<'a, N: NonceSequence> {
    key: &'a mut OpeningKey<N>,
    nonce: Nonce,
}
Expand description

A key operation with a precomputed nonce from a key’s associated NonceSequence.

Fields§

§key: &'a mut OpeningKey<N>§nonce: Nonce

Implementations§

Source§

impl<'a, N: NonceSequence> OpeningKeyPreparedNonce<'a, N>

Source

fn new(key: &'a mut OpeningKey<N>) -> Result<Self, Unspecified>

Source§

impl<N: NonceSequence> OpeningKeyPreparedNonce<'_, N>

Source

pub fn nonce(&self) -> &Nonce

Returns the prepared Nonce that is used for key methods invoked on Self.

Source§

impl<N: NonceSequence> OpeningKeyPreparedNonce<'_, N>

Source

pub fn open_in_place<A>( self, aad: Aad<A>, in_out: &mut [u8], ) -> Result<&mut [u8], Unspecified>
where A: AsRef<[u8]>,

Authenticates and decrypts (“opens”) data in place.

See OpeningKey::open_in_place for additional API information.

§Errors

error::Unspecified when ciphertext is invalid. In this case, in_out may have been overwritten in an unspecified way.

Source

pub fn open_within<A>( self, aad: Aad<A>, in_out: &mut [u8], ciphertext_and_tag: RangeFrom<usize>, ) -> Result<&mut [u8], Unspecified>
where A: AsRef<[u8]>,

Authenticates and decrypts (“opens”) data in place, with a shift.

See OpeningKey::open_within for additional API information.

§Errors

error::Unspecified when ciphertext is invalid. In this case, in_out may have been overwritten in an unspecified way.

Trait Implementations§

Source§

impl<N: NonceSequence> Debug for OpeningKeyPreparedNonce<'_, N>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, N> Freeze for OpeningKeyPreparedNonce<'a, N>

§

impl<'a, N> RefUnwindSafe for OpeningKeyPreparedNonce<'a, N>
where N: RefUnwindSafe,

§

impl<'a, N> Send for OpeningKeyPreparedNonce<'a, N>
where N: Send,

§

impl<'a, N> Sync for OpeningKeyPreparedNonce<'a, N>
where N: Sync,

§

impl<'a, N> Unpin for OpeningKeyPreparedNonce<'a, N>

§

impl<'a, N> !UnwindSafe for OpeningKeyPreparedNonce<'a, N>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.