summaryrefslogtreecommitdiff
path: root/src/ed2k.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ed2k.h')
-rw-r--r--src/ed2k.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/ed2k.h b/src/ed2k.h
index 1be7302..52a4dc5 100644
--- a/src/ed2k.h
+++ b/src/ed2k.h
@@ -1,17 +1,22 @@
#ifndef _ED2K_H_
#define _ED2K_H_
+#include "hash.h"
+
#include <openssl/md4.h>
-class Ed2k {
- private:
- MD4_CTX md4_partial;
- MD4_CTX md4_final;
- unsigned int size_total;
- public:
- Ed2k();
- void update(const char* data, int length);
- char* digest();
-};
+namespace Multihash {
+ class Ed2k : public Hash {
+ private:
+ MD4_CTX md4_partial;
+ MD4_CTX md4_final;
+ unsigned int size_total;
+ protected:
+ virtual void hash_update(const char* data, int length);
+ virtual std::string hash_digest();
+ public:
+ Ed2k(Hash* n = 0);
+ };
+}
#endif // _ED2K_H_