diff options
author | René Korthaus <[email protected]> | 2015-12-23 11:52:19 +0100 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-01-08 19:09:51 -0500 |
commit | d22bc10cd4f67924acd82bcd46a31e3de3b20ce3 (patch) | |
tree | 58459585e6675cd799b6ef5900be026825cd6f9d /src/lib/block/tea | |
parent | 2fbfdd7e5afb5e888fd8c0b56c6df09e2bdeaca7 (diff) |
Mass-prefix member vars with m_
Diffstat (limited to 'src/lib/block/tea')
-rw-r--r-- | src/lib/block/tea/tea.cpp | 14 | ||||
-rw-r--r-- | src/lib/block/tea/tea.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/block/tea/tea.cpp b/src/lib/block/tea/tea.cpp index 01f342607..457171e1d 100644 --- a/src/lib/block/tea/tea.cpp +++ b/src/lib/block/tea/tea.cpp @@ -24,8 +24,8 @@ void TEA::encrypt_n(const byte in[], byte out[], size_t blocks) const for(size_t j = 0; j != 32; ++j) { S += 0x9E3779B9; - L += ((R << 4) + K[0]) ^ (R + S) ^ ((R >> 5) + K[1]); - R += ((L << 4) + K[2]) ^ (L + S) ^ ((L >> 5) + K[3]); + L += ((R << 4) + m_K[0]) ^ (R + S) ^ ((R >> 5) + m_K[1]); + R += ((L << 4) + m_K[2]) ^ (L + S) ^ ((L >> 5) + m_K[3]); } store_be(out, L, R); @@ -48,8 +48,8 @@ void TEA::decrypt_n(const byte in[], byte out[], size_t blocks) const u32bit S = 0xC6EF3720; for(size_t j = 0; j != 32; ++j) { - R -= ((L << 4) + K[2]) ^ (L + S) ^ ((L >> 5) + K[3]); - L -= ((R << 4) + K[0]) ^ (R + S) ^ ((R >> 5) + K[1]); + R -= ((L << 4) + m_K[2]) ^ (L + S) ^ ((L >> 5) + m_K[3]); + L -= ((R << 4) + m_K[0]) ^ (R + S) ^ ((R >> 5) + m_K[1]); S -= 0x9E3779B9; } @@ -65,14 +65,14 @@ void TEA::decrypt_n(const byte in[], byte out[], size_t blocks) const */ void TEA::key_schedule(const byte key[], size_t) { - K.resize(4); + m_K.resize(4); for(size_t i = 0; i != 4; ++i) - K[i] = load_be<u32bit>(key, i); + m_K[i] = load_be<u32bit>(key, i); } void TEA::clear() { - zap(K); + zap(m_K); } } diff --git a/src/lib/block/tea/tea.h b/src/lib/block/tea/tea.h index 3c5b4773e..fd2b5fe36 100644 --- a/src/lib/block/tea/tea.h +++ b/src/lib/block/tea/tea.h @@ -26,7 +26,7 @@ class BOTAN_DLL TEA : public Block_Cipher_Fixed_Params<8, 16> BlockCipher* clone() const override { return new TEA; } private: void key_schedule(const byte[], size_t) override; - secure_vector<u32bit> K; + secure_vector<u32bit> m_K; }; } |