/*
   +----------------------------------------------------------------------+
   | 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: jmd2.h,v 1.8 2005/01/06 18:16:42 jay Exp $
*/

#ifndef __JMD2_H__
#define __JMD2_H__

#include "jconfig.h"

#if ENABLED_MD2 || ENABLED_MD2_HMAC

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

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

// Crypto++ headers...

#include "md2.h"

using namespace CryptoPP;

#if ENABLED_MD2
class JMD2 : public JHash_Template<MD2, MD2_HASH>
{
	public:
		JMD2(string plaintext = "") : JHash_Template<MD2, MD2_HASH>(plaintext) { }

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

#if ENABLED_MD5_HMAC
class JMD2_HMAC : public JHMAC_Template<MD2, MD2_HMAC>
{
	public:
		JMD2_HMAC(string plaintext = "") : JHMAC_Template<MD2, MD2_HMAC>(plaintext) { }

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


#endif
#endif
