Whitespace checkin

pull/354/merge
Jeffrey Walton 2017-03-11 15:55:44 -05:00
parent ef7a6a2f4e
commit 76377f8219
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 16 additions and 17 deletions

19
drbg.h
View File

@ -463,7 +463,7 @@ void Hash_DRBG<HASH, STRENGTH, SEEDLENGTH>::Hash_Generate(const byte* additional
{
carry = m_v[i] + w[j] + carry;
m_v[i] = static_cast<byte>(carry);
j--; i--; carry >>= 8;
i--; j--; carry >>= 8;
}
while (i>=0)
{
@ -510,20 +510,20 @@ void Hash_DRBG<HASH, STRENGTH, SEEDLENGTH>::Hash_Generate(const byte* additional
byte* p2 = m_c.begin()+SEEDLENGTH-8;
byte* p3 = h.begin()+HASH::DIGESTSIZE-8;
word64 w1 = GetWord<word64>(false, BIG_ENDIAN_ORDER, p1);
word64 w2 = GetWord<word64>(false, BIG_ENDIAN_ORDER, p2);
word64 w3 = GetWord<word64>(false, BIG_ENDIAN_ORDER, p3);
word64 w4 = m_reseed;
const word64 w1 = GetWord<word64>(false, BIG_ENDIAN_ORDER, p1);
const word64 w2 = GetWord<word64>(false, BIG_ENDIAN_ORDER, p2);
const word64 w3 = GetWord<word64>(false, BIG_ENDIAN_ORDER, p3);
const word64 w4 = m_reseed;
word128 r = static_cast<word128>(w1) + w2 + w3 + w4;
PutWord(false, BIG_ENDIAN_ORDER, p1, static_cast<word64>(r));
j -= 8; i -= 8; k=0; carry = static_cast<int>(r >> 64);
i -= 8; j -= 8; k=0; carry = static_cast<int>(r >> 64);
#else
while (k>=0)
{
carry = m_v[i] + m_c[i] + h[j] + GetByte<word64>(BIG_ENDIAN_ORDER, m_reseed, k) + carry;
m_v[i] = static_cast<byte>(carry);
k--; j--; i--; carry >>= 8;
i--; j--; k--; carry >>= 8;
}
#endif
@ -531,15 +531,14 @@ void Hash_DRBG<HASH, STRENGTH, SEEDLENGTH>::Hash_Generate(const byte* additional
{
carry = m_v[i] + m_c[i] + h[j] + carry;
m_v[i] = static_cast<byte>(carry);
j--; i--; carry >>= 8;
i--; j--; carry >>= 8;
}
while (i>=0)
{
carry = m_v[i] + m_c[i] + carry;
m_v[i] = static_cast<byte>(carry);
i--;
carry >>= 8;
i--; carry >>= 8;
}
}