aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/hash.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 03:09:18 +0000
committerlloyd <[email protected]>2010-10-13 03:09:18 +0000
commit53d01738e99edfa58a061057186c2a72117ce5d7 (patch)
tree8d8abb63acbedfd46c6bdeec640f1f13475ba1f7 /src/hash/hash.h
parent61ed0d4d90164675396feb7c7cecdd3bc5012f91 (diff)
Remove HashFunction::HASH_BLOCK_SIZE entirely
Diffstat (limited to 'src/hash/hash.h')
-rw-r--r--src/hash/hash.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/hash/hash.h b/src/hash/hash.h
index b331debc2..95d12806f 100644
--- a/src/hash/hash.h
+++ b/src/hash/hash.h
@@ -18,16 +18,14 @@ namespace Botan {
*/
class BOTAN_DLL HashFunction : public BufferedComputation
{
- /**
- * The hash block size as defined for this algorithm.
- */
- const u32bit HASH_BLOCK_SIZE;
-
public:
/**
- * The hash block size as defined for this algorithm
+ * @param hash_len the output length
+ * @param block_len the internal block size (if applicable)
*/
- virtual size_t hash_block_size() const { return HASH_BLOCK_SIZE; }
+ HashFunction(u32bit hash_len) : BufferedComputation(hash_len) {}
+
+ virtual ~HashFunction() {}
/**
* Get a new object representing the same algorithm as *this
@@ -41,18 +39,15 @@ class BOTAN_DLL HashFunction : public BufferedComputation
virtual std::string name() const = 0;
/**
- * Reset the internal state of this object.
+ * The hash block size as defined for this algorithm
*/
- virtual void clear() = 0;
+ virtual size_t hash_block_size() const { return 0; }
/**
- * @param hash_len the output length
- * @param block_len the internal block size (if applicable)
+ * Reset the internal state of this object.
*/
- HashFunction(u32bit hash_len, u32bit block_len = 0) :
- BufferedComputation(hash_len), HASH_BLOCK_SIZE(block_len) {}
+ virtual void clear() = 0;
- virtual ~HashFunction() {}
private:
HashFunction& operator=(const HashFunction&);
};