This commit is contained in:
Igor Pavlov
2023-12-22 17:17:05 +00:00
committed by Kornel
parent ec44a8a070
commit a36c48cece
954 changed files with 42199 additions and 25482 deletions

View File

@@ -2,6 +2,8 @@
#include "StdAfx.h"
#include <string.h>
#include "../../../C/CpuArch.h"
#include "HmacSha1.h"
@@ -28,7 +30,7 @@ void Pbkdf2Hmac(const Byte *pwd, size_t pwdSize,
MY_ALIGN (16)
UInt32 u[kNumDigestWords];
SetBe32(u, i);
SetBe32(u, i)
ctx.Update((const Byte *)u, 4);
ctx.Final((Byte *)u);
@@ -36,7 +38,7 @@ void Pbkdf2Hmac(const Byte *pwd, size_t pwdSize,
ctx = baseCtx;
ctx.GetLoopXorDigest1((void *)u, numIterations - 1);
const unsigned curSize = (keySize < kDigestSize) ? (unsigned)keySize : kDigestSize;;
const unsigned curSize = (keySize < kDigestSize) ? (unsigned)keySize : kDigestSize;
memcpy(key, (const Byte *)u, curSize);
key += curSize;
keySize -= curSize;