@@ -85,13 +85,13 @@ impl DynKey {
85
85
let aes_key = aes:: hw:: Key :: new ( key, aes, cpu. get_feature ( ) ) ?;
86
86
let gcm_key_value = derive_gcm_key_value ( & aes_key) ;
87
87
let combo = if let Some ( cpu) = cpu. get_feature ( ) {
88
- let gcm_key = gcm:: vclmulavx2:: Key :: new ( gcm_key_value, cpu) ;
88
+ let gcm_key = gcm:: vclmulavx2:: Key :: new ( & gcm_key_value, cpu) ;
89
89
Self :: VAesClMulAvx2 ( Combo { aes_key, gcm_key } )
90
90
} else if let Some ( cpu) = cpu. get_feature ( ) {
91
- let gcm_key = gcm:: clmulavxmovbe:: Key :: new ( gcm_key_value, cpu) ;
91
+ let gcm_key = gcm:: clmulavxmovbe:: Key :: new ( & gcm_key_value, cpu) ;
92
92
Self :: AesHwClMulAvxMovbe ( Combo { aes_key, gcm_key } )
93
93
} else {
94
- let gcm_key = gcm:: clmul:: Key :: new ( gcm_key_value, gcm) ;
94
+ let gcm_key = gcm:: clmul:: Key :: new ( & gcm_key_value, gcm) ;
95
95
Self :: AesHwClMul ( Combo { aes_key, gcm_key } )
96
96
} ;
97
97
return Ok ( combo) ;
@@ -105,7 +105,7 @@ impl DynKey {
105
105
if let ( Some ( aes) , Some ( gcm) ) = ( cpu. get_feature ( ) , cpu. get_feature ( ) ) {
106
106
let aes_key = aes:: hw:: Key :: new ( key, aes, cpu. get_feature ( ) ) ?;
107
107
let gcm_key_value = derive_gcm_key_value ( & aes_key) ;
108
- let gcm_key = gcm:: clmul:: Key :: new ( gcm_key_value, gcm) ;
108
+ let gcm_key = gcm:: clmul:: Key :: new ( & gcm_key_value, gcm) ;
109
109
return Ok ( Self :: AesHwClMul ( Combo { aes_key, gcm_key } ) ) ;
110
110
}
111
111
@@ -131,15 +131,15 @@ impl DynKey {
131
131
fn new_neon ( key : aes:: KeyBytes , cpu : cpu:: aarch64:: Neon ) -> Result < Self , error:: Unspecified > {
132
132
let aes_key = aes:: vp:: Key :: new ( key, cpu) ?;
133
133
let gcm_key_value = derive_gcm_key_value ( & aes_key) ;
134
- let gcm_key = gcm:: neon:: Key :: new ( gcm_key_value, cpu) ;
134
+ let gcm_key = gcm:: neon:: Key :: new ( & gcm_key_value, cpu) ;
135
135
Ok ( Self :: Simd ( Combo { aes_key, gcm_key } ) )
136
136
}
137
137
138
138
#[ cfg( all( target_arch = "arm" , target_endian = "little" ) ) ]
139
139
fn new_neon ( key : aes:: KeyBytes , cpu : cpu:: arm:: Neon ) -> Result < Self , error:: Unspecified > {
140
140
let aes_key = aes:: vp:: Key :: new ( key, cpu) ?;
141
141
let gcm_key_value = derive_gcm_key_value ( & aes_key) ;
142
- let gcm_key = gcm:: neon:: Key :: new ( gcm_key_value, cpu) ;
142
+ let gcm_key = gcm:: neon:: Key :: new ( & gcm_key_value, cpu) ;
143
143
Ok ( Self :: Simd ( Combo { aes_key, gcm_key } ) )
144
144
}
145
145
0 commit comments