LifeCycleState

public enum LifeCycleState : Equatable

Describes the LifeCycle state of an EF/DF according to the ISO/IEC 7816-4:2005(E) #5.3.3.2 Life cycle status byte.

b8 b7 b6 b5 b4 b3 b2 b1 meaning
0 0 0 0 0 0 0 0 No information given
0 0 0 0 0 0 0 1 Created
0 0 0 0 0 0 1 1 Initialized
0 0 0 0 0 1 - 1 Active
0 0 0 0 0 1 - 0 Deactivated
0 0 0 0 1 1 - - Terminated
not all zero x x x x Proprietary
  • No information given (when all bits are 0)

    Declaration

    Swift

    case unknown
  • File is created (when only bit 1 is set)

    Declaration

    Swift

    case creation
  • File is initialized (when bit 2 is set and 3 and 4 not

    Declaration

    Swift

    case initialisation
  • File is active normal

    Declaration

    Swift

    case activated
  • File is not-active hidden

    Declaration

    Swift

    case deactivated
  • File is permanently .deactivated (when bit 4 and 3 are set)

    Declaration

    Swift

    case terminated
  • File is proprietary - values from 0x10 - 0xff

    Declaration

    Swift

    case proprietary
  • Parse a LifeCycleStatus Byte

    Declaration

    Swift

    public static func parseLifeCycle(byte: UInt8) -> LifeCycleState?

    Parameters

    byte

    the LCS byte

    Return Value

    the LCS or nil when invalid (E.g. 0x2, 0x8)