Trait aead::stream::NewStream

source ·
pub trait NewStream<A>: StreamPrimitive<A>where
    A: AeadInPlace,
    A::NonceSize: Sub<Self::NonceOverhead>,
    NonceSize<A, Self>: ArrayLength<u8>,{
    // 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 { ... }
}
Available on crate feature stream only.
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>) -> Selfwhere A: KeyInit, Self: Sized,

Create a new STREAM with the given key and nonce.

Implementors§

source§

impl<A> NewStream<A> for StreamBE32<A>where A: AeadInPlace, A::NonceSize: Sub<U5>, <<A as AeadCore>::NonceSize as Sub<U5>>::Output: ArrayLength<u8>,

source§

impl<A> NewStream<A> for StreamLE31<A>where A: AeadInPlace, A::NonceSize: Sub<U4>, <<A as AeadCore>::NonceSize as Sub<U4>>::Output: ArrayLength<u8>,