aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block/xtea
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/block/xtea
parent2fbfdd7e5afb5e888fd8c0b56c6df09e2bdeaca7 (diff)
Mass-prefix member vars with m_
Diffstat (limited to 'src/lib/block/xtea')
-rw-r--r--src/lib/block/xtea/xtea.cpp20
-rw-r--r--src/lib/block/xtea/xtea.h4
2 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/block/xtea/xtea.cpp b/src/lib/block/xtea/xtea.cpp
index 59060dff7..333406d9b 100644
--- a/src/lib/block/xtea/xtea.cpp
+++ b/src/lib/block/xtea/xtea.cpp
@@ -63,7 +63,7 @@ void XTEA::encrypt_n(const byte in[], byte out[], size_t blocks) const
{
while(blocks >= 4)
{
- xtea_encrypt_4(in, out, &(this->EK[0]));
+ xtea_encrypt_4(in, out, &(this->m_EK[0]));
in += 4 * BLOCK_SIZE;
out += 4 * BLOCK_SIZE;
blocks -= 4;
@@ -76,8 +76,8 @@ void XTEA::encrypt_n(const byte in[], byte out[], size_t blocks) const
for(size_t j = 0; j != 32; ++j)
{
- L += (((R << 4) ^ (R >> 5)) + R) ^ EK[2*j];
- R += (((L << 4) ^ (L >> 5)) + L) ^ EK[2*j+1];
+ L += (((R << 4) ^ (R >> 5)) + R) ^ m_EK[2*j];
+ R += (((L << 4) ^ (L >> 5)) + L) ^ m_EK[2*j+1];
}
store_be(out, L, R);
@@ -94,7 +94,7 @@ void XTEA::decrypt_n(const byte in[], byte out[], size_t blocks) const
{
while(blocks >= 4)
{
- xtea_decrypt_4(in, out, &(this->EK[0]));
+ xtea_decrypt_4(in, out, &(this->m_EK[0]));
in += 4 * BLOCK_SIZE;
out += 4 * BLOCK_SIZE;
blocks -= 4;
@@ -107,8 +107,8 @@ void XTEA::decrypt_n(const byte in[], byte out[], size_t blocks) const
for(size_t j = 0; j != 32; ++j)
{
- R -= (((L << 4) ^ (L >> 5)) + L) ^ EK[63 - 2*j];
- L -= (((R << 4) ^ (R >> 5)) + R) ^ EK[62 - 2*j];
+ R -= (((L << 4) ^ (L >> 5)) + L) ^ m_EK[63 - 2*j];
+ L -= (((R << 4) ^ (R >> 5)) + R) ^ m_EK[62 - 2*j];
}
store_be(out, L, R);
@@ -123,7 +123,7 @@ void XTEA::decrypt_n(const byte in[], byte out[], size_t blocks) const
*/
void XTEA::key_schedule(const byte key[], size_t)
{
- EK.resize(64);
+ m_EK.resize(64);
secure_vector<u32bit> UK(4);
for(size_t i = 0; i != 4; ++i)
@@ -132,15 +132,15 @@ void XTEA::key_schedule(const byte key[], size_t)
u32bit D = 0;
for(size_t i = 0; i != 64; i += 2)
{
- EK[i ] = D + UK[D % 4];
+ m_EK[i ] = D + UK[D % 4];
D += 0x9E3779B9;
- EK[i+1] = D + UK[(D >> 11) % 4];
+ m_EK[i+1] = D + UK[(D >> 11) % 4];
}
}
void XTEA::clear()
{
- zap(EK);
+ zap(m_EK);
}
}
diff --git a/src/lib/block/xtea/xtea.h b/src/lib/block/xtea/xtea.h
index ea5c39418..3baccc866 100644
--- a/src/lib/block/xtea/xtea.h
+++ b/src/lib/block/xtea/xtea.h
@@ -28,11 +28,11 @@ class BOTAN_DLL XTEA : public Block_Cipher_Fixed_Params<8, 16>
/**
* @return const reference to the key schedule
*/
- const secure_vector<u32bit>& get_EK() const { return EK; }
+ const secure_vector<u32bit>& get_EK() const { return m_EK; }
private:
void key_schedule(const byte[], size_t) override;
- secure_vector<u32bit> EK;
+ secure_vector<u32bit> m_EK;
};
}