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

#ifndef __JHMAC_T_H__
#define __JHMAC_T_H__

#include "jhmac.h"

// Crypto++ headers...

#include "hmac.h"

using namespace CryptoPP;

template <typename HASH, enum Hash TYPE>
class JHMAC_Template : public JHMAC
{
	public:
		JHMAC_Template(string plaintext = "");
		inline enum Hash getHashType() const;
		bool hash();
		bool validate();
		bool validate(string plaintext, string hashtext);
		string hashPHPStream(php_stream* in);

		/* This is deprecated. It was used before using php_streams. Use it
		   if you're using this code in something other than the cryptopp PHP
		   extension...
		string hashFile(const string filename); */
};

#include "jhmac_t.cpp"

#endif
