/*
   +----------------------------------------------------------------------+
   | Copyright (c) 2002-2005 J Smith <dark_panda@hushmail.com>            |
   | Crypto++ sources (not included) copyright (c) 1995-2003 Wei Dai      |
   +----------------------------------------------------------------------+
   | Check out COPYING for the exact license.                             |
   +----------------------------------------------------------------------+

$Id: jmd5.h,v 1.8 2005/01/06 18:16:42 jay Exp $
*/

#ifndef __JMD5_H__
#define __JMD5_H__

#include "jconfig.h"

#if ENABLED_MD5 || ENABLED_MD5_HMAC

#if ENABLED_MD5
#include "jhash_t.h"
#endif

#if ENABLED_MD5_HMAC
#include "jhmac_t.h"
#endif

// Crypto++ headers...

#include "md5.h"

using namespace CryptoPP;

#if ENABLED_MD5
class JMD5 : public JHash_Template<MD5, MD5_HASH>
{
	public:
		JMD5(string plaintext = "") : JHash_Template<MD5, MD5_HASH>(plaintext) { }

		static string getHashName() { return "MD5"; }
};
#endif

#if ENABLED_MD5_HMAC
class JMD5_HMAC : public JHMAC_Template<MD5, MD5_HMAC>
{
	public:
		JMD5_HMAC(string plaintext = "") : JHMAC_Template<MD5, MD5_HMAC>(plaintext) { }

		static string getHashName() { return "MD5-HMAC"; }
};
#endif

#endif
#endif
