Struct aead::stream::Decryptor [−][src]
pub struct Decryptor<A, S> where
A: AeadInPlace,
S: StreamPrimitive<A>,
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
NonceSize<A, S>: ArrayLength<u8>, { /* fields omitted */ }
This is supported on crate feature
stream
only.Expand description
Stateful STREAM object which can decrypt AEAD messages one-at-a-time.
This corresponds to the 𝒟 STREAM decryptor object as defined in the paper Online Authenticated-Encryption and its Nonce-Reuse Misuse-Resistance.
Implementations
impl<A, S> Decryptor<A, S> where
A: AeadInPlace,
S: StreamPrimitive<A>,
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
NonceSize<A, S>: ArrayLength<u8>,
impl<A, S> Decryptor<A, S> where
A: AeadInPlace,
S: StreamPrimitive<A>,
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
NonceSize<A, S>: ArrayLength<u8>,
Create a 𝒟 STREAM decryptor object from the given AEAD key and nonce.
Create a 𝒟 STREAM decryptor object from the given AEAD primitive.
Create a 𝒟 STREAM decryptor object from the given STREAM primitive.
pub fn decrypt_next<'msg, 'aad>(
&mut self,
payload: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>>
This is supported on crate feature alloc
only.
pub fn decrypt_next<'msg, 'aad>(
&mut self,
payload: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>>
This is supported on crate feature
alloc
only.Use the underlying AEAD to
decrypt
the next AEAD message in this STREAM, returning the
result as a Vec
.
Use the underlying AEAD to decrypt the next AEAD message in this STREAM in-place.