From d22bc10cd4f67924acd82bcd46a31e3de3b20ce3 Mon Sep 17 00:00:00 2001 From: René Korthaus Date: Wed, 23 Dec 2015 11:52:19 +0100 Subject: Mass-prefix member vars with m_ --- src/lib/block/xtea/xtea.cpp | 20 ++++++++++---------- src/lib/block/xtea/xtea.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/lib/block/xtea') 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 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& get_EK() const { return EK; } + const secure_vector& get_EK() const { return m_EK; } private: void key_schedule(const byte[], size_t) override; - secure_vector EK; + secure_vector m_EK; }; } -- cgit v1.2.3