aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/checksum
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-12-10 13:59:09 -0500
committerJack Lloyd <[email protected]>2017-12-10 13:59:09 -0500
commit95c5eae4ed34331d0e54496d783b6b46e9077a47 (patch)
tree39e2d2c63b9997371286e72d51cc6cbd356ec7dd /src/lib/hash/checksum
parent43b49979fe54de69fb4acdd6d741999899ac35e8 (diff)
Rename CRC24 tables
These conflict with name of temp variables and MSVC gets noisy.
Diffstat (limited to 'src/lib/hash/checksum')
-rw-r--r--src/lib/hash/checksum/crc24/crc24.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/hash/checksum/crc24/crc24.cpp b/src/lib/hash/checksum/crc24/crc24.cpp
index 9aef3e76e..a89bbb2e8 100644
--- a/src/lib/hash/checksum/crc24/crc24.cpp
+++ b/src/lib/hash/checksum/crc24/crc24.cpp
@@ -14,7 +14,7 @@ namespace Botan {
namespace {
-const uint32_t T0[256] = {
+const uint32_t CRC24_T0[256] = {
0x00000000, 0x00FB4C86, 0x000DD58A, 0x00F6990C, 0x00E1E693, 0x001AAA15, 0x00EC3319,
0x00177F9F, 0x003981A1, 0x00C2CD27, 0x0034542B, 0x00CF18AD, 0x00D86732, 0x00232BB4,
0x00D5B2B8, 0x002EFE3E, 0x00894EC5, 0x00720243, 0x00849B4F, 0x007FD7C9, 0x0068A856,
@@ -53,7 +53,7 @@ const uint32_t T0[256] = {
0x000CD1F6, 0x00FA48FA, 0x0001047C, 0x002FFA42, 0x00D4B6C4, 0x00222FC8, 0x00D9634E,
0x00CE1CD1, 0x00355057, 0x00C3C95B, 0x003885DD };
-const uint32_t T1[256] = {
+const uint32_t CRC24_T1[256] = {
0x00000000, 0x00488F66, 0x00901ECD, 0x00D891AB, 0x00DB711C, 0x0093FE7A, 0x004B6FD1,
0x0003E0B7, 0x00B6E338, 0x00FE6C5E, 0x0026FDF5, 0x006E7293, 0x006D9224, 0x00251D42,
0x00FD8CE9, 0x00B5038F, 0x006CC771, 0x00244817, 0x00FCD9BC, 0x00B456DA, 0x00B7B66D,
@@ -92,7 +92,7 @@ const uint32_t T1[256] = {
0x00FA442B, 0x0022D580, 0x006A5AE6, 0x00DF5969, 0x0097D60F, 0x004F47A4, 0x0007C8C2,
0x00042875, 0x004CA713, 0x009436B8, 0x00DCB9DE };
-const uint32_t T2[256] = {
+const uint32_t CRC24_T2[256] = {
0x00000000, 0x00D70983, 0x00555F80, 0x00825603, 0x0051F286, 0x0086FB05, 0x0004AD06,
0x00D3A485, 0x0059A88B, 0x008EA108, 0x000CF70B, 0x00DBFE88, 0x00085A0D, 0x00DF538E,
0x005D058D, 0x008A0C0E, 0x00491C91, 0x009E1512, 0x001C4311, 0x00CB4A92, 0x0018EE17,
@@ -131,7 +131,7 @@ const uint32_t T2[256] = {
0x002633E5, 0x00A465E6, 0x00736C65, 0x00F9606B, 0x002E69E8, 0x00AC3FEB, 0x007B3668,
0x00A892ED, 0x007F9B6E, 0x00FDCD6D, 0x002AC4EE };
-const uint32_t T3[256] = {
+const uint32_t CRC24_T3[256] = {
0x00000000, 0x00520936, 0x00A4126C, 0x00F61B5A, 0x004825D8, 0x001A2CEE, 0x00EC37B4,
0x00BE3E82, 0x006B0636, 0x00390F00, 0x00CF145A, 0x009D1D6C, 0x002323EE, 0x00712AD8,
0x00873182, 0x00D538B4, 0x00D60C6C, 0x0084055A, 0x00721E00, 0x00201736, 0x009E29B4,
@@ -172,16 +172,16 @@ const uint32_t T3[256] = {
inline uint32_t process8(uint32_t crc, uint8_t data)
{
- return (crc >> 8) ^ T0[(crc & 0xff) ^ data];
+ return (crc >> 8) ^ CRC24_T0[(crc & 0xff) ^ data];
}
inline uint32_t process32(uint32_t crc, uint32_t word)
{
crc ^= word;
- crc = T3[(crc >> 0) & 0xff]
- ^ T2[(crc >> 8) & 0xff]
- ^ T1[(crc >> 16) & 0xff]
- ^ T0[(crc >> 24) & 0xff];
+ crc = CRC24_T3[(crc >> 0) & 0xff]
+ ^ CRC24_T2[(crc >> 8) & 0xff]
+ ^ CRC24_T1[(crc >> 16) & 0xff]
+ ^ CRC24_T0[(crc >> 24) & 0xff];
return crc;
}
}