crypto: shash - fold shash_digest_unaligned() into crypto_shash_digest()
authorEric Biggers <ebiggers@google.com>
Mon, 9 Oct 2023 07:32:14 +0000 (00:32 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Oct 2023 05:39:25 +0000 (13:39 +0800)
commit2e02c25ac93463d52bd7c1010cd647c944f179e1
tree96ead6c6abae8e3513a1fd5c2dd9d2ee56745d06
parent313a4074d78fc9b90c93c9298e9f90d86a144231
crypto: shash - fold shash_digest_unaligned() into crypto_shash_digest()

Fold shash_digest_unaligned() into its only remaining caller.  Also,
avoid a redundant check of CRYPTO_TFM_NEED_KEY by replacing the call to
crypto_shash_init() with shash->init(desc).  Finally, replace
shash_update_unaligned() + shash_final_unaligned() with
shash_finup_unaligned() which does exactly that.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/shash.c