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/hash/tiger/tiger.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/lib/hash/tiger/tiger.cpp') diff --git a/src/lib/hash/tiger/tiger.cpp b/src/lib/hash/tiger/tiger.cpp index 79708a902..1da38291c 100644 --- a/src/lib/hash/tiger/tiger.cpp +++ b/src/lib/hash/tiger/tiger.cpp @@ -44,26 +44,26 @@ inline void mix(secure_vector& X) */ void Tiger::compress_n(const byte input[], size_t blocks) { - u64bit A = digest[0], B = digest[1], C = digest[2]; + u64bit A = m_digest[0], B = m_digest[1], C = m_digest[2]; for(size_t i = 0; i != blocks; ++i) { - load_le(X.data(), input, X.size()); + load_le(m_X.data(), input, m_X.size()); - pass(A, B, C, X, 5); mix(X); - pass(C, A, B, X, 7); mix(X); - pass(B, C, A, X, 9); + pass(A, B, C, m_X, 5); mix(m_X); + pass(C, A, B, m_X, 7); mix(m_X); + pass(B, C, A, m_X, 9); - for(size_t j = 3; j != passes; ++j) + for(size_t j = 3; j != m_passes; ++j) { - mix(X); - pass(A, B, C, X, 9); + mix(m_X); + pass(A, B, C, m_X, 9); u64bit T = A; A = C; C = B; B = T; } - A = (digest[0] ^= A); - B = digest[1] = B - digest[1]; - C = (digest[2] += C); + A = (m_digest[0] ^= A); + B = m_digest[1] = B - m_digest[1]; + C = (m_digest[2] += C); input += hash_block_size(); } @@ -74,7 +74,7 @@ void Tiger::compress_n(const byte input[], size_t blocks) */ void Tiger::copy_out(byte output[]) { - copy_out_vec_le(output, output_length(), digest); + copy_out_vec_le(output, output_length(), m_digest); } /* @@ -147,10 +147,10 @@ void Tiger::pass(u64bit& A, u64bit& B, u64bit& C, void Tiger::clear() { MDx_HashFunction::clear(); - zeroise(X); - digest[0] = 0x0123456789ABCDEF; - digest[1] = 0xFEDCBA9876543210; - digest[2] = 0xF096A5B4C3B2E187; + zeroise(m_X); + m_digest[0] = 0x0123456789ABCDEF; + m_digest[1] = 0xFEDCBA9876543210; + m_digest[2] = 0xF096A5B4C3B2E187; } /* @@ -159,7 +159,7 @@ void Tiger::clear() std::string Tiger::name() const { return "Tiger(" + std::to_string(output_length()) + "," + - std::to_string(passes) + ")"; + std::to_string(m_passes) + ")"; } /* @@ -167,10 +167,10 @@ std::string Tiger::name() const */ Tiger::Tiger(size_t hash_len, size_t passes) : MDx_HashFunction(64, false, false), - X(8), - digest(3), - hash_len(hash_len), - passes(passes) + m_X(8), + m_digest(3), + m_hash_len(hash_len), + m_passes(passes) { if(output_length() != 16 && output_length() != 20 && output_length() != 24) throw Invalid_Argument("Tiger: Illegal hash output size: " + -- cgit v1.2.3