aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/sha2_32
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/sha2_32
parentdf0dfeb904485bacb8034d0468b4498130939acc (diff)
Remove BufferedComputation::OUTPUT_LENGTH
Diffstat (limited to 'src/hash/sha2_32')
-rw-r--r--src/hash/sha2_32/sha2_32.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/hash/sha2_32/sha2_32.h b/src/hash/sha2_32/sha2_32.h
index 3b95812b8..ffda11772 100644
--- a/src/hash/sha2_32/sha2_32.h
+++ b/src/hash/sha2_32/sha2_32.h
@@ -19,11 +19,13 @@ namespace Botan {
class BOTAN_DLL SHA_224 : public MDx_HashFunction
{
public:
- void clear();
std::string name() const { return "SHA-224"; }
+ size_t output_length() const { return 28; }
HashFunction* clone() const { return new SHA_224; }
- SHA_224() : MDx_HashFunction(28, 64, true, true), W(64), digest(8)
+ void clear();
+
+ SHA_224() : MDx_HashFunction(64, true, true), W(64), digest(8)
{ clear(); }
private:
void compress_n(const byte[], size_t blocks);
@@ -38,11 +40,13 @@ class BOTAN_DLL SHA_224 : public MDx_HashFunction
class BOTAN_DLL SHA_256 : public MDx_HashFunction
{
public:
- void clear();
std::string name() const { return "SHA-256"; }
+ size_t output_length() const { return 32; }
HashFunction* clone() const { return new SHA_256; }
- SHA_256() : MDx_HashFunction(32, 64, true, true), W(64), digest(8)
+ void clear();
+
+ SHA_256() : MDx_HashFunction(64, true, true), W(64), digest(8)
{ clear(); }
private:
void compress_n(const byte[], size_t blocks);