
// Auto-generated file -- do not edit

#ifndef AUTOGEN_CIPHEREXCEPTION_H
#define AUTOGEN_CIPHEREXCEPTION_H

#include "BoxException.h"

// --------------------------------------------------------------------------
//
// Class
//		Name:    CipherException
//		Purpose: Exception
//		Created: autogen
//
// --------------------------------------------------------------------------
class CipherException : public BoxException
{
public:
	CipherException(unsigned int SubType,
		const std::string& rMessage = "")
	: mSubType(SubType), mMessage(rMessage)
	{
	}
	
	CipherException(const CipherException &rToCopy)
	: mSubType(rToCopy.mSubType), mMessage(rToCopy.mMessage)
	{
	}
	
	~CipherException() throw ()
	{
	}
	
	enum
	{
		ExceptionType = 5
	};

	enum
	{
		Internal = 0,
		UnknownCipherMode = 1,
		AlreadyInitialised = 2,
		BadArguments = 3,
		EVPInitFailure = 4,
		EVPUpdateFailure = 5,
		EVPFinalFailure = 6,
		NotInitialised = 7,
		OutputBufferTooSmall = 8,
		EVPBadKeyLength = 9,
		BeginNotCalled = 10,
		IVSizeImplementationLimitExceeded = 11,
		PseudoRandNotAvailable = 12,
		EVPSetPaddingFailure = 13,
		RandomInitFailed = 14,
		LengthRequestedTooLongForRandomHex = 15
	};
	
	virtual unsigned int GetType() const throw();
	virtual unsigned int GetSubType() const throw();
	virtual const char *what() const throw();
	virtual const std::string& GetMessage() const
	{
		return mMessage;
	}

private:
	unsigned int mSubType;
	std::string mMessage;
};

#endif // AUTOGEN_CIPHEREXCEPTION_H
