Struct aead::stream::StreamBE32 [−][src]
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]
A: AeadInPlace,
A::NonceSize: Sub<U5>,
<<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArrayLength<u8>,
fn from_aead(aead: A, nonce: &Nonce<A, Self>) -> Self
[src]
fn new(key: &Key<A>, nonce: &Nonce<A, Self>) -> Self where
A: NewAead,
Self: Sized,
[src]
A: NewAead,
Self: Sized,
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]
A: AeadInPlace,
A::NonceSize: Sub<U5>,
<<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArrayLength<u8>,
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,
[src]
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,
[src]
A: Send,
impl<A> Sync for StreamBE32<A> where
A: Sync,
[src]
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,
[src]
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,
[src]
A: UnwindSafe,
<<<A as AeadCore>::NonceSize as Sub<UInt<UInt<UInt<UTerm, B1>, B0>, B1>>>::Output as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,