crypto: octeontx - use memcpy_and_pad() in aead_hmac_init()

Use memcpy_and_pad() instead of separate memcpy() and memset() calls to
simplify aead_hmac_init().

Signed-off-by: Thorsten Blum <blum@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Thorsten Blum 2026-09-21 08:11:23 +02:00 committed by Herbert Xu
parent d76957328a
commit 377b26beda

View File

@ -793,8 +793,7 @@ static int aead_hmac_init(struct crypto_aead *cipher,
ipad = ctx->ipad;
opad = ctx->opad;
memcpy(ipad, ctx->key, authkeylen);
memset(ipad + authkeylen, 0, bs - authkeylen);
memcpy_and_pad(ipad, bs, ctx->key, authkeylen, 0);
memcpy(opad, ipad, bs);
for (icount = 0; icount < bs; icount++) {