1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#ifndef _SHA1_H_ #define _SHA1_H_ #include "hash.h" #include <openssl/sha.h> namespace Multihash { class SHA1 : public Hash { private: SHA_CTX sha1_ctx; protected: virtual void hash_update(const char* data, int length); virtual std::string hash_digest(); public: SHA1(Hash* n = 0); }; } #endif // _SHA1_H_