Enum Class MifareClassicKeyType

java.lang.Object
java.lang.Enum<MifareClassicKeyType>
org.eclipse.keypop.storagecard.MifareClassicKeyType
All Implemented Interfaces:
Serializable, Comparable<MifareClassicKeyType>, Constable

public enum MifareClassicKeyType extends Enum<MifareClassicKeyType>
Enumeration of the Mifare Classic key types used for authentication.

Mifare Classic cards support two types of keys per sector for access control: Key A and Key B. Each sector can be protected independently using these keys, allowing fine-grained access control.

Since:
1.1.0
  • Enum Constant Details

    • KEY_A

      public static final MifareClassicKeyType KEY_A
      Key A type.

      This is the primary key used for authentication to a Mifare Classic sector. In most configurations, Key A has read/write permissions while Key B may have restricted permissions.

      Since:
      1.1.0
    • KEY_B

      public static final MifareClassicKeyType KEY_B
      Key B type.

      This is the secondary key used for authentication to a Mifare Classic sector. Key B is often used for restricted operations or read-only access, depending on the sector's access conditions.

      Since:
      1.1.0
  • Method Details

    • values

      public static MifareClassicKeyType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MifareClassicKeyType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null