diff options
author | pixel <pixel> | 2007-09-05 14:35:54 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-09-05 14:35:54 +0000 |
commit | f2411c886d3e3a7de7d56f16bf13569d260039a5 (patch) | |
tree | 6668f85afddf28b83073269c13a9a83c4a780fbe /include | |
parent | 0998405dd2aa8a249ce663524f13a4a8fb30faaa (diff) |
Fixing virtual heritage.
Diffstat (limited to 'include')
-rw-r--r-- | include/GMPHashFunction.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/GMPHashFunction.h b/include/GMPHashFunction.h index 3aa6738..cdbc3dd 100644 --- a/include/GMPHashFunction.h +++ b/include/GMPHashFunction.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: GMPHashFunction.h,v 1.1 2007-09-05 14:11:54 pixel Exp $ */ +/* $Id: GMPHashFunction.h,v 1.2 2007-09-05 14:35:54 pixel Exp $ */ #ifndef __GMPHASHFUNCTION_H__ #define __GMPHASHFUNCTION_H__ @@ -30,13 +30,22 @@ class GMPHashFunction : public HashFunction { mpz_class GFinish(); }; -class GMPSHA1 : public GMPHashFunction, SHA1 { +class GMPSHA1 : public SHA1, GMPHashFunction { + protected: + virtual void update(const unsigned char * data, size_t l) { SHA1::update(data, l); } + virtual size_t finish(Uint8 * digest) { return SHA1::finish(digest); } }; -class GMPSHA256 : public GMPHashFunction, SHA1 { +class GMPSHA256 : public SHA256, GMPHashFunction { + protected: + virtual void update(const unsigned char * data, size_t l) { SHA256::update(data, l); } + virtual size_t finish(Uint8 * digest) { return SHA256::finish(digest); } }; -class GMPMD5 : public GMPHashFunction, SHA1 { +class GMPMD5 : public MD5, GMPHashFunction { + protected: + virtual void update(const unsigned char * data, size_t l) { MD5::update(data, l); } + virtual size_t finish(Uint8 * digest) { return MD5::finish(digest); } }; #endif |