Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1126d47d authored by Corentin LABBE's avatar Corentin LABBE Committed by Herbert Xu
Browse files

crypto: brcm - Use IPAD/OPAD constant



This patch simply replace all occurrence of HMAC IPAD/OPAD value by their
define.

Signed-off-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 03d7db56
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include <crypto/internal/aead.h>
#include <crypto/aes.h>
#include <crypto/des.h>
#include <crypto/hmac.h>
#include <crypto/sha.h>
#include <crypto/md5.h>
#include <crypto/authenc.h>
@@ -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);