Struct aead::stream::StreamBE32 [−][src]
pub struct StreamBE32<A> where
A: AeadInPlace,
A::NonceSize: Sub<U5>,
<<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArrayLength<u8>, { /* fields omitted */ }
This is supported on crate feature
stream
only.The original “Rogaway-flavored” STREAM as described in the paper Online Authenticated-Encryption and its Nonce-Reuse Misuse-Resistance.
Uses a 32-bit big endian counter and 1-byte “last block” flag stored as the last 5-bytes of the AEAD nonce.
Trait Implementations
impl<A> NewStream<A> for StreamBE32<A> where
A: AeadInPlace,
A::NonceSize: Sub<U5>,
<<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArrayLength<u8>,
[src]
impl<A> NewStream<A> for StreamBE32<A> where
A: AeadInPlace,
A::NonceSize: Sub<U5>,
<<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArrayLength<u8>,
[src]impl<A> StreamPrimitive<A> for StreamBE32<A> where
A: AeadInPlace,
A::NonceSize: Sub<U5>,
<<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArrayLength<u8>,
[src]
impl<A> StreamPrimitive<A> for StreamBE32<A> where
A: AeadInPlace,
A::NonceSize: Sub<U5>,
<<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArrayLength<u8>,
[src]type NonceOverhead = U5
Number of bytes this STREAM primitive requires from the nonce.
type Counter = u32
Type used as the STREAM counter.
const COUNTER_INCR: u32
[src]
const COUNTER_MAX: u32
[src]
fn encrypt_in_place(
&self,
position: u32,
last_block: bool,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
[src]
&self,
position: u32,
last_block: bool,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
fn decrypt_in_place(
&self,
position: Self::Counter,
last_block: bool,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
[src]
&self,
position: Self::Counter,
last_block: bool,
associated_data: &[u8],
buffer: &mut dyn Buffer
) -> Result<(), Error>
fn encrypt<'msg, 'aad>(
&self,
position: Self::Counter,
last_block: bool,
plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
[src]
&self,
position: Self::Counter,
last_block: bool,
plaintext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
fn decrypt<'msg, 'aad>(
&self,
position: Self::Counter,
last_block: bool,
ciphertext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
[src]
&self,
position: Self::Counter,
last_block: bool,
ciphertext: impl Into<Payload<'msg, 'aad>>
) -> Result<Vec<u8>, Error>
fn encryptor(self) -> Encryptor<A, Self> where
Self: Sized,
[src]
Self: Sized,
fn decryptor(self) -> Decryptor<A, Self> where
Self: Sized,
[src]
Self: Sized,
Auto Trait Implementations
impl<A> RefUnwindSafe for StreamBE32<A> where
A: RefUnwindSafe,
<<<A as AeadCore>::NonceSize as Sub<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>>::Output as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<A> RefUnwindSafe for StreamBE32<A> where
A: RefUnwindSafe,
<<<A as AeadCore>::NonceSize as Sub<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>>::Output as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<A> Send for StreamBE32<A> where
A: Send,
impl<A> Send for StreamBE32<A> where
A: Send,
impl<A> Sync for StreamBE32<A> where
A: Sync,
impl<A> Sync for StreamBE32<A> where
A: Sync,
impl<A> Unpin for StreamBE32<A> where
A: Unpin,
<<<A as AeadCore>::NonceSize as Sub<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
impl<A> Unpin for StreamBE32<A> where
A: Unpin,
<<<A as AeadCore>::NonceSize as Sub<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
impl<A> UnwindSafe for StreamBE32<A> where
A: UnwindSafe,
<<<A as AeadCore>::NonceSize as Sub<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>>::Output as ArrayLength<u8>>::ArrayType: UnwindSafe,
impl<A> UnwindSafe for StreamBE32<A> where
A: UnwindSafe,
<<<A as AeadCore>::NonceSize as Sub<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>>::Output as ArrayLength<u8>>::ArrayType: UnwindSafe,