mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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:
parent
d76957328a
commit
377b26beda
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user