66extern crate alloc;
77
88use aead:: {
9- AeadCore , AeadInPlace , Buffer , Error , Result ,
9+ AeadCore , AeadInOut , Buffer , Error , Result ,
1010 array:: {
1111 Array , ArraySize ,
1212 typenum:: { U4 , U5 , Unsigned } ,
@@ -32,7 +32,7 @@ pub type NonceSize<A, S> =
3232/// Create a new STREAM from the provided AEAD.
3333pub trait NewStream < A > : StreamPrimitive < A >
3434where
35- A : AeadInPlace ,
35+ A : AeadInOut ,
3636 A :: NonceSize : Sub < Self :: NonceOverhead > ,
3737 NonceSize < A , Self > : ArraySize ,
3838{
5757/// Deliberately immutable and stateless to permit parallel operation.
5858pub trait StreamPrimitive < A >
5959where
60- A : AeadInPlace ,
60+ A : AeadInOut ,
6161 A :: NonceSize : Sub < Self :: NonceOverhead > ,
6262 NonceSize < A , Self > : ArraySize ,
6363{
@@ -165,7 +165,7 @@ macro_rules! impl_stream_object {
165165 #[ derive( Debug ) ]
166166 pub struct $name<A , S >
167167 where
168- A : AeadInPlace ,
168+ A : AeadInOut ,
169169 S : StreamPrimitive <A >,
170170 A :: NonceSize : Sub <<S as StreamPrimitive <A >>:: NonceOverhead >,
171171 NonceSize <A , S >: ArraySize ,
@@ -179,7 +179,7 @@ macro_rules! impl_stream_object {
179179
180180 impl <A , S > $name<A , S >
181181 where
182- A : AeadInPlace ,
182+ A : AeadInOut ,
183183 S : StreamPrimitive <A >,
184184 A :: NonceSize : Sub <<S as StreamPrimitive <A >>:: NonceOverhead >,
185185 NonceSize <A , S >: ArraySize ,
@@ -344,7 +344,7 @@ pub type DecryptorLE31<A> = Decryptor<A, StreamLE31<A>>;
344344#[ derive( Debug ) ]
345345pub struct StreamBE32 < A >
346346where
347- A : AeadInPlace ,
347+ A : AeadInOut ,
348348 A :: NonceSize : Sub < U5 > ,
349349 <<A as AeadCore >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
350350{
@@ -357,7 +357,7 @@ where
357357
358358impl < A > NewStream < A > for StreamBE32 < A >
359359where
360- A : AeadInPlace ,
360+ A : AeadInOut ,
361361 A :: NonceSize : Sub < U5 > ,
362362 <<A as AeadCore >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
363363{
@@ -371,7 +371,7 @@ where
371371
372372impl < A > StreamPrimitive < A > for StreamBE32 < A >
373373where
374- A : AeadInPlace ,
374+ A : AeadInOut ,
375375 A :: NonceSize : Sub < U5 > ,
376376 <<A as AeadCore >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
377377{
@@ -405,7 +405,7 @@ where
405405
406406impl < A > StreamBE32 < A >
407407where
408- A : AeadInPlace ,
408+ A : AeadInOut ,
409409 A :: NonceSize : Sub < U5 > ,
410410 <<A as AeadCore >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
411411{
@@ -434,7 +434,7 @@ where
434434#[ derive( Debug ) ]
435435pub struct StreamLE31 < A >
436436where
437- A : AeadInPlace ,
437+ A : AeadInOut ,
438438 A :: NonceSize : Sub < U4 > ,
439439 <<A as AeadCore >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
440440{
@@ -447,7 +447,7 @@ where
447447
448448impl < A > NewStream < A > for StreamLE31 < A >
449449where
450- A : AeadInPlace ,
450+ A : AeadInOut ,
451451 A :: NonceSize : Sub < U4 > ,
452452 <<A as AeadCore >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
453453{
@@ -461,7 +461,7 @@ where
461461
462462impl < A > StreamPrimitive < A > for StreamLE31 < A >
463463where
464- A : AeadInPlace ,
464+ A : AeadInOut ,
465465 A :: NonceSize : Sub < U4 > ,
466466 <<A as AeadCore >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
467467{
@@ -495,7 +495,7 @@ where
495495
496496impl < A > StreamLE31 < A >
497497where
498- A : AeadInPlace ,
498+ A : AeadInOut ,
499499 A :: NonceSize : Sub < U4 > ,
500500 <<A as AeadCore >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
501501{
0 commit comments