summaryrefslogtreecommitdiff
path: root/include/GMPHashFunction.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/GMPHashFunction.h')
-rw-r--r--include/GMPHashFunction.h17
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