Class SCAuthenticationFailedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.eclipse.keypop.reader.CardCommunicationException
org.eclipse.keypop.storagecard.SCAuthenticationFailedException
All Implemented Interfaces:
Serializable, StorageCardException

public final class SCAuthenticationFailedException extends org.eclipse.keypop.reader.CardCommunicationException implements StorageCardException
Indicates that an authentication attempt on a StorageCard has failed.

This exception is thrown when authentication to a Mifare Classic sector fails, typically due to incorrect key data or key type. Authentication is required before reading from or writing to protected sectors on Mifare Classic cards.

Since:
1.1.0
See Also:
  • Constructor Details

    • SCAuthenticationFailedException

      public SCAuthenticationFailedException(Integer blockAddress, String message)
      Creates a new exception indicating an authentication failure during the execution of a storage card command.
      Parameters:
      blockAddress - The block address involved in the error, or null if not relevant.
      message - The message describing the exception context.
      Since:
      1.1.0
    • SCAuthenticationFailedException

      public SCAuthenticationFailedException(Integer blockAddress, String message, Throwable cause)
      Creates a new exception indicating an authentication failure during the execution of a storage card command, with an underlying cause.
      Parameters:
      blockAddress - The block address involved in the error, or null if not relevant.
      message - The message describing the exception context.
      cause - The underlying cause of the exception.
      Since:
      1.1.0
  • Method Details

    • getBlockAddress

      public Integer getBlockAddress()
      Returns the address of the block involved in the error, if applicable.
      Specified by:
      getBlockAddress in interface StorageCardException
      Returns:
      The block address that caused the error, or null if not relevant.
      Since:
      1.1.0