mirror of https://gitee.com/openkylin/linux.git
crypto: brcm - Use IPAD/OPAD constant
This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
03d7db5654
commit
1126d47db0
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue