From df9c15d40a50ed17baa7bdbb11ef6cca9d410cf3 Mon Sep 17 00:00:00 2001 From: zyp Date: Mon, 8 May 2006 13:23:20 +0000 Subject: [project @ zyp-20060508132320-2c118d1a7e2505db] [project @ 24] Converted from make to distutils. --- src/hash.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/hash.h (limited to 'src/hash.h') diff --git a/src/hash.h b/src/hash.h new file mode 100644 index 0000000..3c7b9c9 --- /dev/null +++ b/src/hash.h @@ -0,0 +1,37 @@ +#ifndef _HASH_H_ +#define _HASH_H_ + +#include + +#include "ed2k.h" + +#include +#include +#include + +class Hash { + private: + bool finished; + + int crc32_ctx; + std::string crc32_str; + + Ed2k ed2k_ctx; + std::string ed2k_str; + + MD5_CTX md5_ctx; + std::string md5_str; + + SHA_CTX sha1_ctx; + std::string sha1_str; + + public: + Hash(); + void update(std::string data); + std::string crc32(); + std::string ed2k(); + std::string md5(); + std::string sha1(); +}; + +#endif // _HASH_H_ -- cgit v1.2.3