Struct aead::stream::Encryptor [−][src]
pub struct Encryptor<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 encrypt AEAD messages one-at-a-time.
This corresponds to the ℰ STREAM encryptor object as defined in the paper Online Authenticated-Encryption and its Nonce-Reuse Misuse-Resistance.
Implementations
impl<A, S> Encryptor<A, S> where
A: AeadInPlace,
S: StreamPrimitive<A>,
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
NonceSize<A, S>: ArrayLength<u8>,
impl<A, S> Encryptor<A, S> where
A: AeadInPlace,
S: StreamPrimitive<A>,
A::NonceSize: Sub<<S as StreamPrimitive<A>>::NonceOverhead>,
NonceSize<A, S>: ArrayLength<u8>,
Create a ℰ STREAM encryptor object from the given AEAD key and nonce.
Create a ℰ STREAM encryptor object from the given AEAD primitive.
Create a ℰ STREAM encryptor object from the given STREAM primitive.
pub fn encrypt_next<'msg, 'aad>(
&mut self,
payload: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>>
This is supported on crate feature alloc
only.
pub fn encrypt_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
encrypt
the next AEAD message in this STREAM, returning the
result as a Vec
.
Use the underlying AEAD to encrypt the next AEAD message in this STREAM in-place.