@@ -102,14 +102,7 @@ use rayon::prelude::*;
102102use digest:: { FixedOutput , InvalidLength , KeyInit , Update , typenum:: Unsigned } ;
103103
104104#[ cfg( feature = "hmac" ) ]
105- use {
106- digest:: {
107- HashMarker ,
108- block_api:: BlockSizeUser ,
109- typenum:: { IsLess , NonZero , True , U256 } ,
110- } ,
111- hmac:: EagerHash ,
112- } ;
105+ use hmac:: EagerHash ;
113106
114107#[ inline( always) ]
115108fn xor ( res : & mut [ u8 ] , salt : & [ u8 ] ) {
@@ -230,9 +223,7 @@ where
230223#[ cfg( feature = "hmac" ) ]
231224pub fn pbkdf2_hmac < D > ( password : & [ u8 ] , salt : & [ u8 ] , rounds : u32 , res : & mut [ u8 ] )
232225where
233- D : EagerHash + HashMarker + Update + FixedOutput + Default + Clone ,
234- <D as EagerHash >:: Core : Sync ,
235- <D as BlockSizeUser >:: BlockSize : IsLess < U256 , Output = True > + NonZero ,
226+ D : EagerHash < Core : Sync > ,
236227{
237228 crate :: pbkdf2 :: < hmac:: Hmac < D > > ( password, salt, rounds, res)
238229 . expect ( "HMAC can be initialized with any key length" ) ;
@@ -254,9 +245,7 @@ where
254245#[ cfg( feature = "hmac" ) ]
255246pub fn pbkdf2_hmac_array < D , const N : usize > ( password : & [ u8 ] , salt : & [ u8 ] , rounds : u32 ) -> [ u8 ; N ]
256247where
257- D : EagerHash + HashMarker + Update + FixedOutput + Default + Clone ,
258- <D as EagerHash >:: Core : Sync ,
259- <D as BlockSizeUser >:: BlockSize : IsLess < U256 , Output = True > + NonZero ,
248+ D : EagerHash < Core : Sync > ,
260249{
261250 let mut buf = [ 0u8 ; N ] ;
262251 pbkdf2_hmac :: < D > ( password, salt, rounds, & mut buf) ;
0 commit comments