FileDocCategorySizeDatePackage
CryptoException.javaAPI DocphoneME MR2 API (J2ME)2910Wed May 02 18:00:40 BST 2007javacard.security

CryptoException

public class CryptoException extends javacard.framework.CardRuntimeException
CryptoException represents a cryptography-related exception.

Fields Summary
public static final short
ILLEGAL_VALUE
This reason code is used to indicate that one or more input parameters is out of allowed bounds.
public static final short
UNINITIALIZED_KEY
This reason code is used to indicate that the key is uninitialized.
public static final short
NO_SUCH_ALGORITHM
This reason code is used to indicate that the requested algorithm or key type is not supported.
public static final short
INVALID_INIT
This reason code is used to indicate that the signature or cipher object has not been correctly initialized for the requested operation.
public static final short
ILLEGAL_USE
This reason code is used to indicate that the signature or cipher algorithm does not pad the incoming message and the input message is not block aligned.
Constructors Summary
public CryptoException(short reason)
Constructs a CryptoException with the specified reason. To conserve on resources use throwIt() to use the JCRE-owned instance of this class.

param
reason the reason for the exception

    
                                     
       
	super(reason);
    
Methods Summary
public static voidthrowIt(short reason)
Throws an instance of CryptoException with the specified reason.

param
reason the reason for the exception
exception
CryptoException always

	throw new CryptoException(reason);