From: Corentin LABBE Date: Fri, 19 May 2017 06:53:28 +0000 (+0200) Subject: crypto: omap-sham - Use IPAD/OPAD constant X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ebd401e702dd88fb95a92617bf52ad41c3bf61cd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git crypto: omap-sham - 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/omap-sham.c b/drivers/crypto/omap-sham.c index d0b16e5e4ee5..1864a57caaa4 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #define MD5_DIGEST_SIZE 16 @@ -1326,8 +1327,8 @@ static int omap_sham_setkey(struct crypto_ahash *tfm, const u8 *key, memcpy(bctx->opad, bctx->ipad, bs); for (i = 0; i < bs; i++) { - bctx->ipad[i] ^= 0x36; - bctx->opad[i] ^= 0x5c; + bctx->ipad[i] ^= HMAC_IPAD_VALUE; + bctx->opad[i] ^= HMAC_OPAD_VALUE; } }