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

#ifndef __JHASH_T_H__
#define __JHASH_T_H__

#include "jhash.h"

using namespace CryptoPP;

template <typename HASH, enum Hash TYPE>
class JHash_Template : public JHash
{
	public:
		JHash_Template(string plaintext = ""); 
		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); */
};

#define HASH_TYPE TYPE

#include "jhash_t.cpp"

#endif
