From 63121e1e169616f724bf79b8aac1a2b4423c8904 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 13 Oct 2010 02:45:00 +0000 Subject: Use output_length() instead of OUTPUT_LENGTH pseudo-property --- src/hash/tiger/tiger.cpp | 8 ++++---- src/hash/tiger/tiger.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/hash/tiger') 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)); diff --git a/src/hash/tiger/tiger.h b/src/hash/tiger/tiger.h index 7305ddb46..7d753c237 100644 --- a/src/hash/tiger/tiger.h +++ b/src/hash/tiger/tiger.h @@ -23,7 +23,7 @@ class BOTAN_DLL Tiger : public MDx_HashFunction HashFunction* clone() const { - return new Tiger(OUTPUT_LENGTH, PASS); + return new Tiger(output_length(), PASS); } /** -- cgit v1.2.3