5
5
#include <linux/crypto.h>
6
6
#include <crypto/internal/aead.h>
7
7
#include <crypto/internal/cipher.h>
8
+ #include <crypto/internal/hash.h>
8
9
#include <crypto/internal/skcipher.h>
9
10
#include <crypto/aes.h>
10
11
#include <crypto/sha1.h>
11
12
#include <crypto/sha2.h>
12
- #include <crypto/hash.h>
13
13
#include <crypto/hmac.h>
14
14
#include <crypto/algapi.h>
15
15
#include <crypto/authenc.h>
@@ -154,19 +154,19 @@ static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,
154
154
155
155
switch (ctx -> qat_hash_alg ) {
156
156
case ICP_QAT_HW_AUTH_ALGO_SHA1 :
157
- if (crypto_shash_export (shash , & ctx -> sha1 ))
157
+ if (crypto_shash_export_core (shash , & ctx -> sha1 ))
158
158
return - EFAULT ;
159
159
for (i = 0 ; i < digest_size >> 2 ; i ++ , hash_state_out ++ )
160
160
* hash_state_out = cpu_to_be32 (ctx -> sha1 .state [i ]);
161
161
break ;
162
162
case ICP_QAT_HW_AUTH_ALGO_SHA256 :
163
- if (crypto_shash_export (shash , & ctx -> sha256 ))
163
+ if (crypto_shash_export_core (shash , & ctx -> sha256 ))
164
164
return - EFAULT ;
165
165
for (i = 0 ; i < digest_size >> 2 ; i ++ , hash_state_out ++ )
166
166
* hash_state_out = cpu_to_be32 (ctx -> sha256 .state [i ]);
167
167
break ;
168
168
case ICP_QAT_HW_AUTH_ALGO_SHA512 :
169
- if (crypto_shash_export (shash , & ctx -> sha512 ))
169
+ if (crypto_shash_export_core (shash , & ctx -> sha512 ))
170
170
return - EFAULT ;
171
171
for (i = 0 ; i < digest_size >> 3 ; i ++ , hash512_state_out ++ )
172
172
* hash512_state_out = cpu_to_be64 (ctx -> sha512 .state [i ]);
@@ -190,19 +190,19 @@ static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,
190
190
191
191
switch (ctx -> qat_hash_alg ) {
192
192
case ICP_QAT_HW_AUTH_ALGO_SHA1 :
193
- if (crypto_shash_export (shash , & ctx -> sha1 ))
193
+ if (crypto_shash_export_core (shash , & ctx -> sha1 ))
194
194
return - EFAULT ;
195
195
for (i = 0 ; i < digest_size >> 2 ; i ++ , hash_state_out ++ )
196
196
* hash_state_out = cpu_to_be32 (ctx -> sha1 .state [i ]);
197
197
break ;
198
198
case ICP_QAT_HW_AUTH_ALGO_SHA256 :
199
- if (crypto_shash_export (shash , & ctx -> sha256 ))
199
+ if (crypto_shash_export_core (shash , & ctx -> sha256 ))
200
200
return - EFAULT ;
201
201
for (i = 0 ; i < digest_size >> 2 ; i ++ , hash_state_out ++ )
202
202
* hash_state_out = cpu_to_be32 (ctx -> sha256 .state [i ]);
203
203
break ;
204
204
case ICP_QAT_HW_AUTH_ALGO_SHA512 :
205
- if (crypto_shash_export (shash , & ctx -> sha512 ))
205
+ if (crypto_shash_export_core (shash , & ctx -> sha512 ))
206
206
return - EFAULT ;
207
207
for (i = 0 ; i < digest_size >> 3 ; i ++ , hash512_state_out ++ )
208
208
* hash512_state_out = cpu_to_be64 (ctx -> sha512 .state [i ]);
0 commit comments