crypto: inside-secure - use hmac ipad/opad constants

Replace the hmac ipad/opad values by their defined constants.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Antoine Ténart 2017-06-15 09:56:17 +02:00 committed by Herbert Xu
parent 14c19b178a
commit aed3731e90
1 changed files with 3 additions and 2 deletions

View File

@ -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;