SCMException

public class SCMException extends Exception

Class describes an error resulting from a request to the SCWS service.

Methods

getErrorCode

public long getErrorCode()

Error code, suitable for checking when specific actions need to be taken depending on the cause.

Possible values are:

  • SCMException.CKR_HOST_MEMORY: Not enough memory on the host computer.
  • SCMException.CKR_GENERAL_ERROR: An unrecoverable error occurred. This may be due to an inconsistency in the smart card data.
  • SCMException.CKR_FUNCTION_FAILED: The operation failed for an unknown reason.
  • SCMException.CKR_ATTRIBUTE_READ_ONLY: The token object cannot be modified because it is read-only.
  • SCMException.CKR_ATTRIBUTE_SENSITIVE: The token object cannot be read because it is sensitive.
  • SCMException.CKR_ATTRIBUTE_TYPE_INVALID: The object attribute is invalid.
  • SCMException.CKR_ATTRIBUTE_VALUE_INVALID: The value of the object attribute is invalid.
  • SCMException.CKR_DATA_INVALID: The data is invalid.
  • SCMException.CKR_DATA_LEN_RANGE: The length of the data is inconsistent.
  • SCMException.CKR_DEVICE_ERROR: An error occurred during the communication with the card.
  • SCMException.CKR_DEVICE_MEMORY: There is not enough memory space available in the card.
  • SCMException.CKR_DEVICE_REMOVED: The card has been removed during the operation.
  • SCMException.CKR_ENCRYPTED_DATA_INVALID: The encrypted data is invalid.
  • SCMException.CKR_ENCRYPTED_DATA_LEN_RANGE: The length of the encrypted data is invalid.
  • SCMException.CKR_FUNCTION_CANCELED: The operation has been cancelled.
  • SCMException.CXR_FUNCTION_TIMED_OUT: The operation took too long.
  • SCMException.CKR_FUNCTION_NOT_SUPPORTED: The operation is not supported by the card.
  • SCMException.CKR_KEY_SIZE_RANGE: The key size is outside of the range supported for this operation.
  • SCMException.CKR_KEY_TYPE_INCONSISTENT: The key types are inconsistent for this operation.
  • SCMException.CKR_KEY_FUNCTION_NOT_PERMITTED: The key does not support this operation.
  • SCMException.CKR_KEY_UNEXTRACTABLE: The key cannot be extracted.
  • SCMException.CKR_MECHANISM_INVALID: The cryptographic algorithm is not supported.
  • SCMException.CKR_MECHANISM_PARAM_INVALID: The parameters for the cryptographic operation are incorrect.
  • SCMException.CKR_PIN_INCORRECT: The PIN value is incorrect.
  • SCMException.CKR_PIN_INVALID: The PIN does not have the proper format.
  • SCMException.CKR_PIN_LEN_RANGE: The length of the PIN is outside of the range.
  • SCMException.CKR_PIN_EXPIRED: The PIN has expired and needs to be changed.
  • SCMException.CKR_PIN_LOCKED: The PIN has been blocked.
  • SCMException.CKR_SIGNATURE_INVALID: The digital signature in invalid.
  • SCMException.CKR_SIGNATURE_LEN_RANGE: The length od the digital signature is incorrect.
  • SCMException.CKR_TOKEN_NOT_PRESENT: The token has been removed.
  • SCMException.CKR_TOKEN_NOT_RECOGNIZED: The token is not supported.
  • SCMException.CKR_TOKEN_WRITE_PROTECTED: The token is write-protected.
  • SCMException.CKR_USER_ALREADY_LOGGED_IN: The user is already logged in.
  • SCMException.CKR_USER_NOT_LOGGED_IN: The appropriate user is not logged in.
  • SCMException.CKR_USER_PIN_NOT_INITIALIZED: The user PIN on this token has never been initially set.
  • SCMException.CKR_USER_TYPE_INVALID: The required user type is not defined for this card.
  • SCMException.CKR_USER_ANOTHER_ALREADY_LOGGED_IN: Another user is currently logged in.
  • SCMException.CKR_USER_TOO_MANY_TYPES: Too many users are logged in the token.
  • SCMException.CKR_INFORMATION_SENSITIVE: The information is private and cannot be revealed.
  • SCMException.CXR_NO_LICENSE_KEY: The software license key is invalid.
  • SCMException.CXR_BT_PERMISSIONS_NOT_GRANTED: Bluetooth permissions are not granted.
  • SCMException.CXR_BT_INITIALIZATION_FAILED: The initialization of bluetooth service failed. Maybe it is not enabled on your device.
  • SCMException.CXR_BT_NOT_SCANNING: Bluetooth scan has not been started or has been stopped.
  • SCMException.CXR_BT_DEVICE_NOT_SUPPORTED: The bluetooth peripheral is not supported.
  • SCMException.CXR_BT_DEVICE_NOT_DETECTED: The bluetooth peripheral is not detected.
  • SCMException.CXR_BT_ALREADY_PAIRED: The current operation is not permitted because a bluetooth peripheral is already paired.
Returns:the error code.

getStringCode

public String getStringCode()

Human-readable error message.

Returns:the error message.