From: Corentin LABBE Date: Fri, 19 May 2017 06:53:24 +0000 (+0200) Subject: crypto: brcm - Use IPAD/OPAD constant X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1126d47db0cf40a5f31060095507ea5416a43344;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git crypto: brcm - Use IPAD/OPAD constant This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/bcm/cipher.c b/drivers/crypto/bcm/cipher.c index cc0d5b98006e..61393dc70b0b 100644 --- a/drivers/crypto/bcm/cipher.c +++ b/drivers/crypto/bcm/cipher.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -2510,8 +2511,8 @@ static int ahash_hmac_setkey(struct crypto_ahash *ahash, const u8 *key, memcpy(ctx->opad, ctx->ipad, blocksize); for (index = 0; index < blocksize; index++) { - ctx->ipad[index] ^= 0x36; - ctx->opad[index] ^= 0x5c; + ctx->ipad[index] ^= HMAC_IPAD_VALUE; + ctx->opad[index] ^= HMAC_OPAD_VALUE; } flow_dump(" ipad: ", ctx->ipad, blocksize);