Cleanup pass
This commit is contained in:
@@ -101,7 +101,7 @@ namespace Nz
|
||||
{
|
||||
struct HashMD5_state
|
||||
{
|
||||
UInt32 count[2]; /* message length in bits, lsw first */
|
||||
std::size_t count[2]; /* message length in bits, lsw first */
|
||||
UInt32 abcd[4]; /* digest buffer */
|
||||
UInt8 buf[64]; /* accumulate block */
|
||||
};
|
||||
@@ -280,9 +280,9 @@ namespace Nz
|
||||
void HashMD5::Append(const UInt8* data, std::size_t len)
|
||||
{
|
||||
const UInt8 *p = data;
|
||||
int left = len;
|
||||
std::size_t left = len;
|
||||
int offset = (m_state->count[0] >> 3) & 63;
|
||||
UInt32 nbits = len << 3;
|
||||
std::size_t nbits = len << 3;
|
||||
|
||||
if (len <= 0)
|
||||
return;
|
||||
@@ -296,7 +296,7 @@ namespace Nz
|
||||
/* Process an initial partial block. */
|
||||
if (offset)
|
||||
{
|
||||
int copy = (offset + len > 64 ? 64 - offset : len);
|
||||
std::size_t copy = (offset + len > 64 ? 64 - offset : len);
|
||||
|
||||
std::memcpy(m_state->buf + offset, p, copy);
|
||||
if (offset + copy < 64)
|
||||
|
||||
@@ -75,8 +75,8 @@ namespace Nz
|
||||
{
|
||||
struct HashWhirlpool_state
|
||||
{
|
||||
int bufferBits; // current number of bits on the buffer */
|
||||
int bufferPos; // current (possibly incomplete) byte slot on the buffer */
|
||||
std::size_t bufferBits; // current number of bits on the buffer */
|
||||
std::size_t bufferPos; // current (possibly incomplete) byte slot on the buffer */
|
||||
UInt8 bitLength[32]; // global number of hashed bits (256-bit counter) */
|
||||
UInt8 buffer[64]; // buffer of data to hash */
|
||||
UInt64 hash[8]; // the hashing state */
|
||||
@@ -877,8 +877,8 @@ namespace Nz
|
||||
UInt32 b;
|
||||
UInt8* buffer = m_state->buffer;
|
||||
UInt8* bitLength = m_state->bitLength;
|
||||
int bufferBits = m_state->bufferBits;
|
||||
int bufferPos = m_state->bufferPos;
|
||||
std::size_t bufferBits = m_state->bufferBits;
|
||||
std::size_t bufferPos = m_state->bufferPos;
|
||||
|
||||
// tally the length of the added data
|
||||
UInt64 value = len;
|
||||
@@ -968,8 +968,8 @@ namespace Nz
|
||||
|
||||
UInt8 *buffer = m_state->buffer;
|
||||
UInt8 *bitLength = m_state->bitLength;
|
||||
int bufferBits = m_state->bufferBits;
|
||||
int bufferPos = m_state->bufferPos;
|
||||
std::size_t bufferBits = m_state->bufferBits;
|
||||
std::size_t bufferPos = m_state->bufferPos;
|
||||
UInt8 *digest = result;
|
||||
|
||||
// append a '1'-bit
|
||||
|
||||
@@ -2115,7 +2115,7 @@ namespace Nz
|
||||
|
||||
return ptr - m_sharedString->string.get();
|
||||
}
|
||||
catch (utf8::not_enough_room& e)
|
||||
catch (utf8::not_enough_room& /*e*/)
|
||||
{
|
||||
// Returns npos
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user