Update comments

This commit is contained in:
Jeffrey Walton 2017-08-25 06:41:24 -04:00
parent b3278a3cd2
commit 952ec1c5c8
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 4 additions and 4 deletions

View File

@ -52,7 +52,7 @@ void PadlockRNG::GenerateBlock(byte *output, size_t size)
);
const size_t ret = m_msr & 0x1f;
const size_t rem = STDMIN<size_t>(ret, STDMIN<size_t>(size, 16U));
const size_t rem = STDMIN<size_t>(ret, STDMIN<size_t>(size, 16U /*buffer size*/));
std::memcpy(output, m_buffer, rem);
size -= rem; output += rem;
}
@ -71,7 +71,7 @@ void PadlockRNG::GenerateBlock(byte *output, size_t size)
}
const size_t ret = (m_msr = result) & 0x1f;
const size_t rem = STDMIN<size_t>(ret, STDMIN<size_t>(size, 16U));
const size_t rem = STDMIN<size_t>(ret, STDMIN<size_t>(size, 16U /*buffer size*/));
std::memcpy(output, buffer, rem);
size -= rem; output += rem;
}

View File

@ -81,8 +81,8 @@ public:
//! \brief Generate and discard n bytes
//! \param n the number of bytes to generate and discard
//! \details the RDSEED generator discards words, not bytes. If n is
//! not a multiple of a machine word, then it is rounded up to
//! \details the Padlock generator discards words, not bytes. If n is
//! not a multiple of a 32-bit word, then it is rounded up to
//! that size.
virtual void DiscardBytes(size_t n);