diff --git a/padlkrng.cpp b/padlkrng.cpp index 5c6830c3..54449a31 100644 --- a/padlkrng.cpp +++ b/padlkrng.cpp @@ -52,7 +52,7 @@ void PadlockRNG::GenerateBlock(byte *output, size_t size) ); const size_t ret = m_msr & 0x1f; - const size_t rem = STDMIN(ret, STDMIN(size, 16U)); + const size_t rem = STDMIN(ret, STDMIN(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(ret, STDMIN(size, 16U)); + const size_t rem = STDMIN(ret, STDMIN(size, 16U /*buffer size*/)); std::memcpy(output, buffer, rem); size -= rem; output += rem; } diff --git a/padlkrng.h b/padlkrng.h index cd70b693..541ae223 100644 --- a/padlkrng.h +++ b/padlkrng.h @@ -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);