diff options
Diffstat (limited to 'src/checksum/crc32/crc32.cpp')
-rw-r--r-- | src/checksum/crc32/crc32.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/checksum/crc32/crc32.cpp b/src/checksum/crc32/crc32.cpp index 42462096f..574e13bae 100644 --- a/src/checksum/crc32/crc32.cpp +++ b/src/checksum/crc32/crc32.cpp @@ -13,7 +13,7 @@ namespace Botan { /* * Update a CRC32 Checksum */ -void CRC32::add_data(const byte input[], u32bit length) +void CRC32::add_data(const byte input[], size_t length) { const u32bit TABLE[256] = { 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, @@ -83,8 +83,8 @@ void CRC32::add_data(const byte input[], u32bit length) length -= 16; } - for(u32bit j = 0; j != length; ++j) - tmp = TABLE[(tmp ^ input[j]) & 0xFF] ^ (tmp >> 8); + for(size_t i = 0; i != length; ++i) + tmp = TABLE[(tmp ^ input[i]) & 0xFF] ^ (tmp >> 8); crc = tmp; } |