@@ -314,30 +314,30 @@ static int chcr_compute_partial_hash(struct shash_desc *desc,
314
314
if (digest_size == SHA1_DIGEST_SIZE ) {
315
315
error = crypto_shash_init (desc ) ?:
316
316
crypto_shash_update (desc , iopad , SHA1_BLOCK_SIZE ) ?:
317
- crypto_shash_export (desc , ( void * ) & sha1_st );
317
+ crypto_shash_export_core (desc , & sha1_st );
318
318
memcpy (result_hash , sha1_st .state , SHA1_DIGEST_SIZE );
319
319
} else if (digest_size == SHA224_DIGEST_SIZE ) {
320
320
error = crypto_shash_init (desc ) ?:
321
321
crypto_shash_update (desc , iopad , SHA256_BLOCK_SIZE ) ?:
322
- crypto_shash_export (desc , ( void * ) & sha256_st );
322
+ crypto_shash_export_core (desc , & sha256_st );
323
323
memcpy (result_hash , sha256_st .state , SHA256_DIGEST_SIZE );
324
324
325
325
} else if (digest_size == SHA256_DIGEST_SIZE ) {
326
326
error = crypto_shash_init (desc ) ?:
327
327
crypto_shash_update (desc , iopad , SHA256_BLOCK_SIZE ) ?:
328
- crypto_shash_export (desc , ( void * ) & sha256_st );
328
+ crypto_shash_export_core (desc , & sha256_st );
329
329
memcpy (result_hash , sha256_st .state , SHA256_DIGEST_SIZE );
330
330
331
331
} else if (digest_size == SHA384_DIGEST_SIZE ) {
332
332
error = crypto_shash_init (desc ) ?:
333
333
crypto_shash_update (desc , iopad , SHA512_BLOCK_SIZE ) ?:
334
- crypto_shash_export (desc , ( void * ) & sha512_st );
334
+ crypto_shash_export_core (desc , & sha512_st );
335
335
memcpy (result_hash , sha512_st .state , SHA512_DIGEST_SIZE );
336
336
337
337
} else if (digest_size == SHA512_DIGEST_SIZE ) {
338
338
error = crypto_shash_init (desc ) ?:
339
339
crypto_shash_update (desc , iopad , SHA512_BLOCK_SIZE ) ?:
340
- crypto_shash_export (desc , ( void * ) & sha512_st );
340
+ crypto_shash_export_core (desc , & sha512_st );
341
341
memcpy (result_hash , sha512_st .state , SHA512_DIGEST_SIZE );
342
342
} else {
343
343
error = - EINVAL ;
0 commit comments