aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/sha1/sha160.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-29 13:51:27 +0000
committerlloyd <[email protected]>2010-10-29 13:51:27 +0000
commit633175a57a03ed9bf5a5e3577bfc26068c62b688 (patch)
tree086eb3a931d39fb35f8a3896a25a5cb38736a696 /src/hash/sha1/sha160.h
parentdf0dfeb904485bacb8034d0468b4498130939acc (diff)
Remove BufferedComputation::OUTPUT_LENGTH
Diffstat (limited to 'src/hash/sha1/sha160.h')
-rw-r--r--src/hash/sha1/sha160.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/hash/sha1/sha160.h b/src/hash/sha1/sha160.h
index d420f8f94..3038039cf 100644
--- a/src/hash/sha1/sha160.h
+++ b/src/hash/sha1/sha160.h
@@ -18,11 +18,16 @@ namespace Botan {
class BOTAN_DLL SHA_160 : public MDx_HashFunction
{
public:
- void clear();
std::string name() const { return "SHA-160"; }
+ size_t output_length() const { return 20; }
HashFunction* clone() const { return new SHA_160; }
- SHA_160();
+ void clear();
+
+ SHA_160() : MDx_HashFunction(64, true, true), digest(5), W(80)
+ {
+ clear();
+ }
protected:
/**
* Set a custom size for the W array. Normally 80, but some
@@ -30,7 +35,11 @@ class BOTAN_DLL SHA_160 : public MDx_HashFunction
* constraints
* @param W_size how big to make W
*/
- SHA_160(size_t W_size);
+ SHA_160(size_t W_size) :
+ MDx_HashFunction(64, true, true), digest(5), W(W_size)
+ {
+ clear();
+ }
void compress_n(const byte[], size_t blocks);
void copy_out(byte[]);