@@ -15,7 +15,7 @@ pub mod consts {
1515
1616pub use aead:: {
1717 self , AeadCore , AeadInOut , Error , KeyInit , KeySizeUser ,
18- array:: { Array , AssocArraySize } ,
18+ array:: { Array , AsArrayRef , AssocArraySize } ,
1919} ;
2020
2121use aead:: {
@@ -249,7 +249,7 @@ where
249249 let checksum_rhs = & mut [ 0u8 ; 16 ] ;
250250 checksum_rhs[ ..remaining_bytes] . copy_from_slice ( tail. get_in ( ) ) ;
251251 checksum_rhs[ remaining_bytes] = 0b1000_0000 ;
252- inplace_xor ( & mut checksum_i, checksum_rhs. as_ref ( ) ) ;
252+ inplace_xor ( & mut checksum_i, checksum_rhs. as_array_ref ( ) ) ;
253253 // C_* = P_* xor Pad[1..bitlen(P_*)]
254254 let p_star = tail. get_out ( ) ;
255255 let pad = & mut pad[ ..p_star. len ( ) ] ;
@@ -333,7 +333,7 @@ where
333333 let checksum_rhs = & mut [ 0u8 ; 16 ] ;
334334 checksum_rhs[ ..remaining_bytes] . copy_from_slice ( tail. get_out ( ) ) ;
335335 checksum_rhs[ remaining_bytes] = 0b1000_0000 ;
336- inplace_xor ( & mut checksum_i, checksum_rhs. as_ref ( ) ) ;
336+ inplace_xor ( & mut checksum_i, checksum_rhs. as_array_ref ( ) ) ;
337337 }
338338
339339 self . compute_tag ( associated_data, & mut checksum_i, & offset_i)
@@ -588,6 +588,7 @@ pub(crate) fn split_into_two_blocks<'i, 'o>(
588588#[ cfg( test) ]
589589mod tests {
590590 use super :: * ;
591+ use aead:: array:: Array ;
591592 use dbl:: Dbl ;
592593 use hex_literal:: hex;
593594
@@ -609,7 +610,7 @@ mod tests {
609610 let expected_ll0 = Block :: from ( hex ! ( "1A84ECDE1E3D6E09BD3E058A8723606D" ) ) ;
610611 let expected_ll1 = Block :: from ( hex ! ( "3509D9BC3C7ADC137A7C0B150E46C0DA" ) ) ;
611612
612- let cipher = aes:: Aes128 :: new ( key . as_ref ( ) ) ;
613+ let cipher = aes:: Aes128 :: new ( & Array ( key ) ) ;
613614 let ( ll_star, ll_dollar, ll) = key_dependent_variables ( & cipher) ;
614615
615616 assert_eq ! ( ll_star, expected_ll_star) ;
@@ -629,7 +630,7 @@ mod tests {
629630
630631 const TAGLEN : u32 = 16 ;
631632
632- let cipher = aes:: Aes128 :: new ( key . as_ref ( ) ) ;
633+ let cipher = aes:: Aes128 :: new ( & Array ( key ) ) ;
633634 let ( bottom, stretch) =
634635 nonce_dependent_variables :: < aes:: Aes128 , U12 > ( & cipher, & Nonce :: from ( nonce) , TAGLEN ) ;
635636 let offset_0 = initial_offset :: < aes:: Aes128 , U12 > ( & cipher, & Nonce :: from ( nonce) , TAGLEN ) ;
0 commit comments