Skip to main content

NewStream

Trait NewStream 

Source
pub trait NewStream<A>: StreamPrimitive<A>
where A: AeadInOut, A::NonceSize: Sub<Self::NonceOverhead>, NonceSize<A, Self>: ArraySize,
{ // Required method fn from_aead(aead: A, nonce: &Nonce<A, Self>) -> Self; // Provided method fn new(key: &Key<A>, nonce: &Nonce<A, Self>) -> Self where A: KeyInit, Self: Sized { ... } }
Expand description

Create a new STREAM from the provided AEAD.

Required Methods§

Source

fn from_aead(aead: A, nonce: &Nonce<A, Self>) -> Self

Create a new STREAM from the given AEAD cipher.

Provided Methods§

Source

fn new(key: &Key<A>, nonce: &Nonce<A, Self>) -> Self
where A: KeyInit, Self: Sized,

Create a new STREAM with the given key and nonce.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<A> NewStream<A> for StreamBE32<A>
where A: AeadInOut, A::NonceSize: Sub<U5>, <<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArraySize,

Source§

impl<A> NewStream<A> for StreamLE31<A>
where A: AeadInOut, A::NonceSize: Sub<U4>, <<A as AeadCore>::NonceSize as Sub<U4>>::Output: ArraySize,