diff --git a/aead/src/stream.rs b/aead/src/stream.rs index d2ec4d491..3e220b6fb 100644 --- a/aead/src/stream.rs +++ b/aead/src/stream.rs @@ -277,6 +277,20 @@ where nonce: Nonce, } +impl NewStream for StreamBE32 +where + A: AeadInPlace, + A::NonceSize: Sub, + <::NonceSize as Sub>::Output: ArrayLength, +{ + fn from_aead(aead: A, nonce: &Nonce) -> Self { + Self { + aead, + nonce: nonce.clone(), + } + } +} + impl StreamPrimitive for StreamBE32 where A: AeadInPlace, @@ -352,6 +366,20 @@ where nonce: Nonce, } +impl NewStream for StreamLE31 +where + A: AeadInPlace, + A::NonceSize: Sub, + <::NonceSize as Sub>::Output: ArrayLength, +{ + fn from_aead(aead: A, nonce: &Nonce) -> Self { + Self { + aead, + nonce: nonce.clone(), + } + } +} + impl StreamPrimitive for StreamLE31 where A: AeadInPlace,