"

2013 FRC Java API

"

com.sun.squawk.security
Class CryptoException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sun.squawk.security.CryptoException

public class CryptoException
extends RuntimeException

CryptoException represents a cryptography-related exception.

See Also:
com.sun.squawk.security.verifier.SHA, com.sun.squawk.security.signing.SHA, com.sun.squawk.security.signing.ECDSASignature, com.sun.squawk.security.signing.PseudoRand

Field Summary
static int 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.
static int ILLEGAL_VALUE
          This reason code is used to indicate that one or more input parameters is out of allowed bounds.
static int INVALID_INIT
          This reason code is used to indicate that the signature or cipher object has not been correctly initialized for the requested operation.
static int UNINITIALIZED_KEY
          This reason code is used to indicate that the key is uninitialized.
 
Constructor Summary
CryptoException(int reason)
          Constructs a CryptoException with the specified reason.
 
Method Summary
 int getReason()
          Gets the reason code
 int setReason(int reason)
          Sets the reason code
static void throwIt(int reason)
          Throws a CryptoException with the specified reason.
 String toString()
          Returns a human readable string describing this exception.
 
Methods inherited from class java.lang.Throwable
getMessage, printStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ILLEGAL_VALUE

public static final int ILLEGAL_VALUE
This reason code is used to indicate that one or more input parameters is out of allowed bounds.

See Also:
Constant Field Values

UNINITIALIZED_KEY

public static final int UNINITIALIZED_KEY
This reason code is used to indicate that the key is uninitialized.

See Also:
Constant Field Values

INVALID_INIT

public static final int INVALID_INIT
This reason code is used to indicate that the signature or cipher object has not been correctly initialized for the requested operation.

See Also:
Constant Field Values

ILLEGAL_USE

public static final int 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.

See Also:
Constant Field Values
Constructor Detail

CryptoException

public CryptoException(int reason)
Constructs a CryptoException with the specified reason.

Parameters:
reason - the reason for the exception
Method Detail

getReason

public int getReason()
Gets the reason code

Returns:
the reason for the exception

setReason

public int setReason(int reason)
Sets the reason code

Parameters:
reason - the reason for the exception

throwIt

public static void throwIt(int reason)
                    throws CryptoException
Throws a CryptoException with the specified reason.

Parameters:
reason - the reason for the exception
Throws:
CryptoException - always

toString

public String toString()
Returns a human readable string describing this exception.

Overrides:
toString in class Throwable
Returns:
string representation of this exception

"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"