diff options
author | lloyd <[email protected]> | 2010-10-29 13:51:27 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-29 13:51:27 +0000 |
commit | 633175a57a03ed9bf5a5e3577bfc26068c62b688 (patch) | |
tree | 086eb3a931d39fb35f8a3896a25a5cb38736a696 /src/checksum | |
parent | df0dfeb904485bacb8034d0468b4498130939acc (diff) |
Remove BufferedComputation::OUTPUT_LENGTH
Diffstat (limited to 'src/checksum')
-rw-r--r-- | src/checksum/adler32/adler32.h | 7 | ||||
-rw-r--r-- | src/checksum/crc24/crc24.h | 7 | ||||
-rw-r--r-- | src/checksum/crc32/crc32.h | 7 |
3 files changed, 15 insertions, 6 deletions
diff --git a/src/checksum/adler32/adler32.h b/src/checksum/adler32/adler32.h index 3a2441ad3..dc2872ca1 100644 --- a/src/checksum/adler32/adler32.h +++ b/src/checksum/adler32/adler32.h @@ -18,10 +18,13 @@ namespace Botan { class BOTAN_DLL Adler32 : public HashFunction { public: - void clear() { S1 = 1; S2 = 0; } std::string name() const { return "Adler32"; } + size_t output_length() const { return 4; } HashFunction* clone() const { return new Adler32; } - Adler32() : HashFunction(4) { clear(); } + + void clear() { S1 = 1; S2 = 0; } + + Adler32() { clear(); } ~Adler32() { clear(); } private: void add_data(const byte[], size_t); diff --git a/src/checksum/crc24/crc24.h b/src/checksum/crc24/crc24.h index f9786dfa4..b5faebcee 100644 --- a/src/checksum/crc24/crc24.h +++ b/src/checksum/crc24/crc24.h @@ -18,10 +18,13 @@ namespace Botan { class BOTAN_DLL CRC24 : public HashFunction { public: - void clear() { crc = 0xB704CE; } std::string name() const { return "CRC24"; } + size_t output_length() const { return 3; } HashFunction* clone() const { return new CRC24; } - CRC24() : HashFunction(3) { clear(); } + + void clear() { crc = 0xB704CE; } + + CRC24() { clear(); } ~CRC24() { clear(); } private: void add_data(const byte[], size_t); diff --git a/src/checksum/crc32/crc32.h b/src/checksum/crc32/crc32.h index aa8c366e5..dec3d0449 100644 --- a/src/checksum/crc32/crc32.h +++ b/src/checksum/crc32/crc32.h @@ -18,10 +18,13 @@ namespace Botan { class BOTAN_DLL CRC32 : public HashFunction { public: - void clear() { crc = 0xFFFFFFFF; } std::string name() const { return "CRC32"; } + size_t output_length() const { return 4; } HashFunction* clone() const { return new CRC32; } - CRC32() : HashFunction(4) { clear(); } + + void clear() { crc = 0xFFFFFFFF; } + + CRC32() { clear(); } ~CRC32() { clear(); } private: void add_data(const byte[], size_t); |