// HexCode.h: interface for the WMHexCode class.
//
//////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000 Robert Cunnings. All rights reserved.
//
// You may copy, modify, distribute or publish this code free of charge.
//
// NO WARRANTY: This software is provided AS IS, without warranty of any kind.
//
//////////////////////////////////////////////////////////////////////
//
// Class used to hex encode and decode binary data.
// 
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_HEXCODE_H__89048801_DE31_4856_9B41_EA9711991A22__INCLUDED_)
#define AFX_HEXCODE_H__89048801_DE31_4856_9B41_EA9711991A22__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <string>

using namespace std;

class WMHexCode  
{
public:
	WMHexCode();
	virtual ~WMHexCode();

	bool Encode(const unsigned char *pszUnencoded, int nLength, string& strEncoded);
	bool Decode(const string& strEncoded, unsigned char *pszDecoded, int& nOutLength);


protected:
	string	m_strHexChars;
};

#endif // !defined(AFX_HEXCODE_H__89048801_DE31_4856_9B41_EA9711991A22__INCLUDED_)
