diff options
author | lloyd <[email protected]> | 2010-10-29 13:51:27 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-29 13:51:27 +0000 |
commit | 633175a57a03ed9bf5a5e3577bfc26068c62b688 (patch) | |
tree | 086eb3a931d39fb35f8a3896a25a5cb38736a696 /src/hash/tiger/tiger.cpp | |
parent | df0dfeb904485bacb8034d0468b4498130939acc (diff) |
Remove BufferedComputation::OUTPUT_LENGTH
Diffstat (limited to 'src/hash/tiger/tiger.cpp')
-rw-r--r-- | src/hash/tiger/tiger.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/hash/tiger/tiger.cpp b/src/hash/tiger/tiger.cpp index 7f95267aa..6f40f84c8 100644 --- a/src/hash/tiger/tiger.cpp +++ b/src/hash/tiger/tiger.cpp @@ -55,7 +55,7 @@ void Tiger::compress_n(const byte input[], size_t blocks) pass(C, A, B, X, 7); mix(X); pass(B, C, A, X, 9); - for(size_t j = 3; j != PASS; ++j) + for(size_t j = 3; j != passes; ++j) { mix(X); pass(A, B, C, X, 9); @@ -160,24 +160,26 @@ void Tiger::clear() */ std::string Tiger::name() const { - return "Tiger(" + to_string(output_length()) + "," + to_string(PASS) + ")"; + return "Tiger(" + to_string(output_length()) + "," + to_string(passes) + ")"; } /* * Tiger Constructor */ -Tiger::Tiger(size_t hashlen, size_t pass) : - MDx_HashFunction(hashlen, 64, false, false), +Tiger::Tiger(size_t hash_len, size_t passes) : + MDx_HashFunction(64, false, false), X(8), digest(3), - PASS(pass) + hash_len(hash_len), + passes(passes) { if(output_length() != 16 && output_length() != 20 && output_length() != 24) throw Invalid_Argument("Tiger: Illegal hash output size: " + to_string(output_length())); - if(PASS < 3) + + if(passes < 3) throw Invalid_Argument("Tiger: Invalid number of passes: " - + to_string(PASS)); + + to_string(passes)); clear(); } |