diff options
Diffstat (limited to 'src/lib/hash/checksum/crc32')
-rw-r--r-- | src/lib/hash/checksum/crc32/crc32.cpp | 8 | ||||
-rw-r--r-- | src/lib/hash/checksum/crc32/crc32.h | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/hash/checksum/crc32/crc32.cpp b/src/lib/hash/checksum/crc32/crc32.cpp index ca8c87c5f..1bbc35ac8 100644 --- a/src/lib/hash/checksum/crc32/crc32.cpp +++ b/src/lib/hash/checksum/crc32/crc32.cpp @@ -13,9 +13,9 @@ namespace Botan { /* * Update a CRC32 Checksum */ -void CRC32::add_data(const byte input[], size_t length) +void CRC32::add_data(const uint8_t input[], size_t length) { - const u32bit TABLE[256] = { + const uint32_t TABLE[256] = { 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, @@ -60,7 +60,7 @@ void CRC32::add_data(const byte input[], size_t length) 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D }; - u32bit tmp = m_crc; + uint32_t tmp = m_crc; while(length >= 16) { tmp = TABLE[(tmp ^ input[ 0]) & 0xFF] ^ (tmp >> 8); @@ -92,7 +92,7 @@ void CRC32::add_data(const byte input[], size_t length) /* * Finalize a CRC32 Checksum */ -void CRC32::final_result(byte output[]) +void CRC32::final_result(uint8_t output[]) { m_crc ^= 0xFFFFFFFF; store_be(m_crc, output); diff --git a/src/lib/hash/checksum/crc32/crc32.h b/src/lib/hash/checksum/crc32/crc32.h index 987f34608..fd9db1b3e 100644 --- a/src/lib/hash/checksum/crc32/crc32.h +++ b/src/lib/hash/checksum/crc32/crc32.h @@ -27,9 +27,9 @@ class BOTAN_DLL CRC32 final : public HashFunction CRC32() { clear(); } ~CRC32() { clear(); } private: - void add_data(const byte[], size_t) override; - void final_result(byte[]) override; - u32bit m_crc; + void add_data(const uint8_t[], size_t) override; + void final_result(uint8_t[]) override; + uint32_t m_crc; }; } |