
// Auto-generated file -- do not edit

#include "Box.h"
#include "autogen_CipherException.h"

#include "MemLeakFindOn.h"

#ifdef EXCEPTION_CODENAMES_EXTENDED
	#ifdef EXCEPTION_CODENAMES_EXTENDED_WITH_DESCRIPTION
static const char *whats[] = {
	"Cipher Internal",
	"Cipher UnknownCipherMode",
	"Cipher AlreadyInitialised",
	"Cipher BadArguments",
	"Cipher EVPInitFailure",
	"Cipher EVPUpdateFailure",
	"Cipher EVPFinalFailure",
	"Cipher NotInitialised",
	"Cipher OutputBufferTooSmall",
	"Cipher EVPBadKeyLength",
	"Cipher BeginNotCalled",
	"Cipher IVSizeImplementationLimitExceeded",
	"Cipher PseudoRandNotAvailable",
	"Cipher EVPSetPaddingFailure",
	"Cipher RandomInitFailed (Failed to read from random device)",
	"Cipher LengthRequestedTooLongForRandomHex"
};
	#else
static const char *whats[] = {
	"Cipher Internal",
	"Cipher UnknownCipherMode",
	"Cipher AlreadyInitialised",
	"Cipher BadArguments",
	"Cipher EVPInitFailure",
	"Cipher EVPUpdateFailure",
	"Cipher EVPFinalFailure",
	"Cipher NotInitialised",
	"Cipher OutputBufferTooSmall",
	"Cipher EVPBadKeyLength",
	"Cipher BeginNotCalled",
	"Cipher IVSizeImplementationLimitExceeded",
	"Cipher PseudoRandNotAvailable",
	"Cipher EVPSetPaddingFailure",
	"Cipher RandomInitFailed",
	"Cipher LengthRequestedTooLongForRandomHex"
};
	#endif
#endif

unsigned int CipherException::GetType() const throw()
{
	return CipherException::ExceptionType;
}

unsigned int CipherException::GetSubType() const throw()
{
	return mSubType;
}

const char *CipherException::what() const throw()
{
#ifdef EXCEPTION_CODENAMES_EXTENDED
	if(mSubType < 0 || mSubType > (sizeof(whats) / sizeof(whats[0])))
	{
		return "Cipher";
	}
	return whats[mSubType];
#else
	return "Cipher";
#endif
}

