crypto: atmel-sha - Add zero length message digest support for hmac
authorRyan Wanner <Ryan.Wanner@microchip.com>
Tue, 28 Mar 2023 19:56:26 +0000 (12:56 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 6 Apr 2023 08:41:28 +0000 (16:41 +0800)
commit232c1e8e19ff8e60237012fadead02557aafca5a
tree0362b66282a5a637c74c0e47a79a4ebdb19cb524
parenta4b16dad46576ce08ecb660fc923d0857dcae107
crypto: atmel-sha - Add zero length message digest support for hmac

Add softare padding to hmac-sha digest for zero length messages.
Using the atmel_sha_fill_padding() to fill the buffer with a padded
empty message with a length of the block size.

Create a temporary scatter list from the padded buffer to pass into the
data processing functions.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-sha.c