Message ID | 20170615075629.30907-2-antoine.tenart@free-electrons.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
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 <crypto/hmac.h> #include <crypto/sha.h> #include <linux/device.h> #include <linux/dma-mapping.h> @@ -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;
Replace the hmac ipad/opad values by their defined constants. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> --- drivers/crypto/inside-secure/safexcel_hash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)