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>
impl<'a, N: NonceSequence> OpeningKeyPreparedNonce<'a, N>
fn new(key: &'a mut OpeningKey<N>) -> Result<Self, Unspecified>
Source§impl<N: NonceSequence> OpeningKeyPreparedNonce<'_, N>
impl<N: NonceSequence> OpeningKeyPreparedNonce<'_, N>
Source§impl<N: NonceSequence> OpeningKeyPreparedNonce<'_, N>
impl<N: NonceSequence> OpeningKeyPreparedNonce<'_, N>
Sourcepub fn open_in_place<A>(
self,
aad: Aad<A>,
in_out: &mut [u8],
) -> Result<&mut [u8], Unspecified>
pub fn open_in_place<A>( self, aad: Aad<A>, in_out: &mut [u8], ) -> Result<&mut [u8], Unspecified>
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.
Sourcepub fn open_within<A>(
self,
aad: Aad<A>,
in_out: &mut [u8],
ciphertext_and_tag: RangeFrom<usize>,
) -> Result<&mut [u8], Unspecified>
pub fn open_within<A>( self, aad: Aad<A>, in_out: &mut [u8], ciphertext_and_tag: RangeFrom<usize>, ) -> Result<&mut [u8], Unspecified>
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§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more