diff options
author | lloyd <[email protected]> | 2010-10-13 02:45:00 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-13 02:45:00 +0000 |
commit | 63121e1e169616f724bf79b8aac1a2b4423c8904 (patch) | |
tree | 2375d5b5daaad8990b2cee951d137f2e7638e79b /src/hash/tiger/tiger.cpp | |
parent | 879d062c2b93e32362e338d1c6f9b1eda0f88493 (diff) |
Use output_length() instead of OUTPUT_LENGTH pseudo-property
Diffstat (limited to 'src/hash/tiger/tiger.cpp')
-rw-r--r-- | src/hash/tiger/tiger.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hash/tiger/tiger.cpp b/src/hash/tiger/tiger.cpp index fa5effd80..67baf8d19 100644 --- a/src/hash/tiger/tiger.cpp +++ b/src/hash/tiger/tiger.cpp @@ -75,7 +75,7 @@ void Tiger::compress_n(const byte input[], size_t blocks) */ void Tiger::copy_out(byte output[]) { - for(size_t i = 0; i != OUTPUT_LENGTH; ++i) + for(size_t i = 0; i != output_length(); ++i) output[i] = get_byte(7 - (i % 8), digest[i/8]); } @@ -160,7 +160,7 @@ 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(PASS) + ")"; } /* @@ -172,9 +172,9 @@ Tiger::Tiger(size_t hashlen, size_t pass) : digest(3), PASS(pass) { - if(OUTPUT_LENGTH != 16 && OUTPUT_LENGTH != 20 && OUTPUT_LENGTH != 24) + if(output_length() != 16 && output_length() != 20 && output_length() != 24) throw Invalid_Argument("Tiger: Illegal hash output size: " + - to_string(OUTPUT_LENGTH)); + to_string(output_length())); if(PASS < 3) throw Invalid_Argument("Tiger: Invalid number of passes: " + to_string(PASS)); |