From: Antoine Ténart Date: Thu, 15 Jun 2017 07:56:17 +0000 (+0200) Subject: crypto: inside-secure - use hmac ipad/opad constants X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aed3731e9039285c1d98f7636f5be92ea5db9e6a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git crypto: inside-secure - use hmac ipad/opad constants Replace the hmac ipad/opad values by their defined constants. Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c index 060ea034c9da..6eee1a502225 100644 --- a/drivers/crypto/inside-secure/safexcel_hash.c +++ b/drivers/crypto/inside-secure/safexcel_hash.c @@ -8,6 +8,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -774,8 +775,8 @@ static int safexcel_hmac_init_pad(struct ahash_request *areq, memcpy(opad, ipad, blocksize); for (i = 0; i < blocksize; i++) { - ipad[i] ^= 0x36; - opad[i] ^= 0x5c; + ipad[i] ^= HMAC_IPAD_VALUE; + opad[i] ^= HMAC_OPAD_VALUE; } return 0;