66extern crate alloc;
77
88use aead:: {
9- AeadCore , AeadInPlace , Buffer , Error , Result ,
9+ Aead , Buffer , Error , Result ,
1010 array:: {
1111 Array , ArraySize ,
1212 typenum:: { U4 , U5 , Unsigned } ,
@@ -27,12 +27,12 @@ pub type Nonce<A, S> = Array<u8, NonceSize<A, S>>;
2727/// Size of a nonce as used by a STREAM construction, sans the overhead of
2828/// the STREAM protocol itself.
2929pub type NonceSize < A , S > =
30- <<A as AeadCore >:: NonceSize as Sub < <S as StreamPrimitive < A > >:: NonceOverhead > >:: Output ;
30+ <<A as Aead >:: NonceSize as Sub < <S as StreamPrimitive < A > >:: NonceOverhead > >:: Output ;
3131
3232/// Create a new STREAM from the provided AEAD.
3333pub trait NewStream < A > : StreamPrimitive < A >
3434where
35- A : AeadInPlace ,
35+ A : Aead ,
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 : Aead ,
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 : Aead ,
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 : Aead ,
183183 S : StreamPrimitive <A >,
184184 A :: NonceSize : Sub <<S as StreamPrimitive <A >>:: NonceOverhead >,
185185 NonceSize <A , S >: ArraySize ,
@@ -344,9 +344,9 @@ pub type DecryptorLE31<A> = Decryptor<A, StreamLE31<A>>;
344344#[ derive( Debug ) ]
345345pub struct StreamBE32 < A >
346346where
347- A : AeadInPlace ,
347+ A : Aead ,
348348 A :: NonceSize : Sub < U5 > ,
349- <<A as AeadCore >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
349+ <<A as Aead >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
350350{
351351 /// Underlying AEAD cipher
352352 aead : A ,
@@ -357,9 +357,9 @@ where
357357
358358impl < A > NewStream < A > for StreamBE32 < A >
359359where
360- A : AeadInPlace ,
360+ A : Aead ,
361361 A :: NonceSize : Sub < U5 > ,
362- <<A as AeadCore >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
362+ <<A as Aead >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
363363{
364364 fn from_aead ( aead : A , nonce : & Nonce < A , Self > ) -> Self {
365365 Self {
@@ -371,9 +371,9 @@ where
371371
372372impl < A > StreamPrimitive < A > for StreamBE32 < A >
373373where
374- A : AeadInPlace ,
374+ A : Aead ,
375375 A :: NonceSize : Sub < U5 > ,
376- <<A as AeadCore >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
376+ <<A as Aead >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
377377{
378378 type NonceOverhead = U5 ;
379379 type Counter = u32 ;
@@ -405,9 +405,9 @@ where
405405
406406impl < A > StreamBE32 < A >
407407where
408- A : AeadInPlace ,
408+ A : Aead ,
409409 A :: NonceSize : Sub < U5 > ,
410- <<A as AeadCore >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
410+ <<A as Aead >:: NonceSize as Sub < U5 > >:: Output : ArraySize ,
411411{
412412 /// Compute the full AEAD nonce including the STREAM counter and last
413413 /// block flag.
@@ -434,9 +434,9 @@ where
434434#[ derive( Debug ) ]
435435pub struct StreamLE31 < A >
436436where
437- A : AeadInPlace ,
437+ A : Aead ,
438438 A :: NonceSize : Sub < U4 > ,
439- <<A as AeadCore >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
439+ <<A as Aead >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
440440{
441441 /// Underlying AEAD cipher
442442 aead : A ,
@@ -447,9 +447,9 @@ where
447447
448448impl < A > NewStream < A > for StreamLE31 < A >
449449where
450- A : AeadInPlace ,
450+ A : Aead ,
451451 A :: NonceSize : Sub < U4 > ,
452- <<A as AeadCore >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
452+ <<A as Aead >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
453453{
454454 fn from_aead ( aead : A , nonce : & Nonce < A , Self > ) -> Self {
455455 Self {
@@ -461,9 +461,9 @@ where
461461
462462impl < A > StreamPrimitive < A > for StreamLE31 < A >
463463where
464- A : AeadInPlace ,
464+ A : Aead ,
465465 A :: NonceSize : Sub < U4 > ,
466- <<A as AeadCore >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
466+ <<A as Aead >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
467467{
468468 type NonceOverhead = U4 ;
469469 type Counter = u32 ;
@@ -495,9 +495,9 @@ where
495495
496496impl < A > StreamLE31 < A >
497497where
498- A : AeadInPlace ,
498+ A : Aead ,
499499 A :: NonceSize : Sub < U4 > ,
500- <<A as AeadCore >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
500+ <<A as Aead >:: NonceSize as Sub < U4 > >:: Output : ArraySize ,
501501{
502502 /// Compute the full AEAD nonce including the STREAM counter and last
503503 /// block flag.
0 commit comments