aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/checksum
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2015-12-23 11:52:19 +0100
committerJack Lloyd <[email protected]>2016-01-08 19:09:51 -0500
commitd22bc10cd4f67924acd82bcd46a31e3de3b20ce3 (patch)
tree58459585e6675cd799b6ef5900be026825cd6f9d /src/lib/hash/checksum
parent2fbfdd7e5afb5e888fd8c0b56c6df09e2bdeaca7 (diff)
Mass-prefix member vars with m_
Diffstat (limited to 'src/lib/hash/checksum')
-rw-r--r--src/lib/hash/checksum/adler32/adler32.cpp6
-rw-r--r--src/lib/hash/checksum/adler32/adler32.h4
-rw-r--r--src/lib/hash/checksum/crc24/crc24.cpp6
-rw-r--r--src/lib/hash/checksum/crc24/crc24.h4
-rw-r--r--src/lib/hash/checksum/crc32/crc32.cpp8
-rw-r--r--src/lib/hash/checksum/crc32/crc32.h4
6 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/hash/checksum/adler32/adler32.cpp b/src/lib/hash/checksum/adler32/adler32.cpp
index f368b627c..304c664dd 100644
--- a/src/lib/hash/checksum/adler32/adler32.cpp
+++ b/src/lib/hash/checksum/adler32/adler32.cpp
@@ -61,12 +61,12 @@ void Adler32::add_data(const byte input[], size_t length)
while(length >= PROCESS_AMOUNT)
{
- adler32_update(input, PROCESS_AMOUNT, S1, S2);
+ adler32_update(input, PROCESS_AMOUNT, m_S1, m_S2);
input += PROCESS_AMOUNT;
length -= PROCESS_AMOUNT;
}
- adler32_update(input, length, S1, S2);
+ adler32_update(input, length, m_S1, m_S2);
}
/*
@@ -74,7 +74,7 @@ void Adler32::add_data(const byte input[], size_t length)
*/
void Adler32::final_result(byte output[])
{
- store_be(output, S2, S1);
+ store_be(output, m_S2, m_S1);
clear();
}
diff --git a/src/lib/hash/checksum/adler32/adler32.h b/src/lib/hash/checksum/adler32/adler32.h
index 307236d6d..c42c184c9 100644
--- a/src/lib/hash/checksum/adler32/adler32.h
+++ b/src/lib/hash/checksum/adler32/adler32.h
@@ -22,14 +22,14 @@ class BOTAN_DLL Adler32 : public HashFunction
size_t output_length() const override { return 4; }
HashFunction* clone() const override { return new Adler32; }
- void clear() override { S1 = 1; S2 = 0; }
+ void clear() override { m_S1 = 1; m_S2 = 0; }
Adler32() { clear(); }
~Adler32() { clear(); }
private:
void add_data(const byte[], size_t) override;
void final_result(byte[]) override;
- u16bit S1, S2;
+ u16bit m_S1, m_S2;
};
}
diff --git a/src/lib/hash/checksum/crc24/crc24.cpp b/src/lib/hash/checksum/crc24/crc24.cpp
index 1484f643d..6f1eea453 100644
--- a/src/lib/hash/checksum/crc24/crc24.cpp
+++ b/src/lib/hash/checksum/crc24/crc24.cpp
@@ -60,7 +60,7 @@ void CRC24::add_data(const byte input[], size_t length)
0x00FA48FA, 0x007C0401, 0x0042FA2F, 0x00C4B6D4, 0x00C82F22, 0x004E63D9,
0x00D11CCE, 0x00575035, 0x005BC9C3, 0x00DD8538 };
- u32bit tmp = crc;
+ u32bit tmp = m_crc;
while(length >= 16)
{
tmp = TABLE[((tmp >> 16) ^ input[ 0]) & 0xFF] ^ (tmp << 8);
@@ -86,7 +86,7 @@ void CRC24::add_data(const byte input[], size_t length)
for(size_t i = 0; i != length; ++i)
tmp = TABLE[((tmp >> 16) ^ input[i]) & 0xFF] ^ (tmp << 8);
- crc = tmp;
+ m_crc = tmp;
}
/*
@@ -95,7 +95,7 @@ void CRC24::add_data(const byte input[], size_t length)
void CRC24::final_result(byte output[])
{
for(size_t i = 0; i != 3; ++i)
- output[i] = get_byte(i+1, crc);
+ output[i] = get_byte(i+1, m_crc);
clear();
}
diff --git a/src/lib/hash/checksum/crc24/crc24.h b/src/lib/hash/checksum/crc24/crc24.h
index 8df8bd727..8e9ce9315 100644
--- a/src/lib/hash/checksum/crc24/crc24.h
+++ b/src/lib/hash/checksum/crc24/crc24.h
@@ -22,14 +22,14 @@ class BOTAN_DLL CRC24 : public HashFunction
size_t output_length() const override { return 3; }
HashFunction* clone() const override { return new CRC24; }
- void clear() override { crc = 0xB704CE; }
+ void clear() override { m_crc = 0xB704CE; }
CRC24() { clear(); }
~CRC24() { clear(); }
private:
void add_data(const byte[], size_t) override;
void final_result(byte[]) override;
- u32bit crc;
+ u32bit m_crc;
};
}
diff --git a/src/lib/hash/checksum/crc32/crc32.cpp b/src/lib/hash/checksum/crc32/crc32.cpp
index 10d989cc6..ca8c87c5f 100644
--- a/src/lib/hash/checksum/crc32/crc32.cpp
+++ b/src/lib/hash/checksum/crc32/crc32.cpp
@@ -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 = crc;
+ u32bit tmp = m_crc;
while(length >= 16)
{
tmp = TABLE[(tmp ^ input[ 0]) & 0xFF] ^ (tmp >> 8);
@@ -86,7 +86,7 @@ void CRC32::add_data(const byte input[], size_t length)
for(size_t i = 0; i != length; ++i)
tmp = TABLE[(tmp ^ input[i]) & 0xFF] ^ (tmp >> 8);
- crc = tmp;
+ m_crc = tmp;
}
/*
@@ -94,8 +94,8 @@ void CRC32::add_data(const byte input[], size_t length)
*/
void CRC32::final_result(byte output[])
{
- crc ^= 0xFFFFFFFF;
- store_be(crc, output);
+ m_crc ^= 0xFFFFFFFF;
+ store_be(m_crc, output);
clear();
}
diff --git a/src/lib/hash/checksum/crc32/crc32.h b/src/lib/hash/checksum/crc32/crc32.h
index 8ae95d42a..98c9a020c 100644
--- a/src/lib/hash/checksum/crc32/crc32.h
+++ b/src/lib/hash/checksum/crc32/crc32.h
@@ -22,14 +22,14 @@ class BOTAN_DLL CRC32 : public HashFunction
size_t output_length() const override { return 4; }
HashFunction* clone() const override { return new CRC32; }
- void clear() override { crc = 0xFFFFFFFF; }
+ void clear() override { m_crc = 0xFFFFFFFF; }
CRC32() { clear(); }
~CRC32() { clear(); }
private:
void add_data(const byte[], size_t) override;
void final_result(byte[]) override;
- u32bit crc;
+ u32bit m_crc;
};
}