amlib.ccid

## Class Reader4442

- java.lang.Object
- - amlib.ccid.Reader
  - - amlib.ccid.Reader4442

-     public class Reader4442
      extends Reader

- - ### Field Summary

    - ### Fields inherited from class amlib.ccid.Reader

      `CardModeASYNC, CardModeAT45D041, CardModeAT88SC102, CardModeAT88SC153, CardModeAT88SC1608, CardModeI2C, CardModeINPHONE, CardModeSLE4428, CardModeSLE4442, CardModeSLE6636, CCID_POWEROFF, CCID_POWERON, CCID_PROTOCOL_NA, CCID_PROTOCOL_T0, CCID_PROTOCOL_T1, SLOT_STATUS_CARD_ABSENT, SLOT_STATUS_CARD_ACTIVE, SLOT_STATUS_CARD_INACTIVE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Reader4442(HardwareInterface Dev)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `open()` To open the reader.
    `int` | `open(int slot)` To open reader with given slot
    `int` | `SLE4442Cmd_CompareVerificationData(byte bAddress, byte bData)` SLE4442Cmd_CompareVerificationData compares the data with the specified reference byte in the security memory.
    `int` | `SLE4442Cmd_ReadMainMemory(byte bAddress, byte bReadLen, byte[] pReadData, int[] pReturnLen)` SLE4442Cmd_ReadMainMemory reads data from the main memory of the card.
    `int` | `SLE4442Cmd_ReadProtectionMemory(byte bReadLen, byte[] pReadData, int[] pIntReturnLen)` SLE4442Cmd_ReadProtectionMemory reads data from the protection memory of the card.
    `int` | `SLE4442Cmd_ReadSecurityMemory(byte bReadLen, byte[] pReadData, int[] pIntReturnLen)` SLE4442Cmd_ReadSecurityMemory reads data from the security memory of the card.
    `int` | `SLE4442Cmd_UpdateMainMemory(byte bAddress, byte bData)` SLE4442Cmd_UpdateMainMemory updates one byte data in the main memory of the card.
    `int` | `SLE4442Cmd_UpdateSecurityMemory(byte bAddress, byte bData)` SLE4442CmdUpdateSecurityMemory updates one byte data in the main memory of the card.
    `int` | `SLE4442Cmd_Verify(int intPinLen, byte[] pPinData)` SLE4442Cmd_Verify Verify the pin of the card.
    `int` | `SLE4442Cmd_WriteProtectionMemory(byte bAddress, byte bData)` SLE4442CmdWriteProtectionMemory write one byte data in the protection memory of the card.

    - ### Methods inherited from class amlib.ccid.Reader

      `close, escape, getAtr, getAtrString, getCardStatus, getCmdFailCode, getCurrentDev, getProtocol, getSN, setPower, setSlot, switchMode, transmit`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Reader4442

          public Reader4442(HardwareInterface Dev)
                     throws ReaderException

      Constructor
      Parameters:
        `Dev` - HardwareInterface object which has been initialed
      Throws:
        `ReaderException`
      See Also:
        `ReaderException`

  - ### Method Detail

    - #### open

          public int open(int slot)

      Description copied from class: `Reader`
      To open reader with given slot
      Overrides:
        `open` in class `Reader`
      Parameters:
        `slot` - slot number to open
      Returns:
        READER_SUCCESSFUL or other error code

    - #### open

          public int open()

      Description copied from class: `Reader`
      To open the reader.
      Overrides:
        `open` in class `Reader`
      Returns:
        READER_SUCCESSFUL or other error code

    - #### SLE4442Cmd_ReadMainMemory

          public int SLE4442Cmd_ReadMainMemory(byte bAddress,
                                               byte bReadLen,
                                               byte[] pReadData,
                                               int[] pReturnLen)

      SLE4442Cmd_ReadMainMemory reads data from the main memory of the card.
      Parameters:
        `bAddress` - The memory address to read from.
        `bReadLen` - Number of bytes to be read from the card.
        `pReadData` - Pointer to a buffer that receives the data read from the card.
        `pReturnLen` - Pointer to the length, in bytes, of the pReadData parameter and receives the actual number of bytes received from the card
      Returns:
        zero for success.

    - #### SLE4442Cmd_UpdateMainMemory

          public int SLE4442Cmd_UpdateMainMemory(byte bAddress,
                                                 byte bData)

      SLE4442Cmd_UpdateMainMemory updates one byte data in the main memory of the card.
      Parameters:
        `bAddress` - The main memory address to update
        `bData` - The updated data.
      Returns:
        zero for success.

    - #### SLE4442Cmd_ReadProtectionMemory

          public int SLE4442Cmd_ReadProtectionMemory(byte bReadLen,
                                                     byte[] pReadData,
                                                     int[] pIntReturnLen)

      SLE4442Cmd_ReadProtectionMemory reads data from the protection memory of the card.
      Parameters:
        `bReadLen` - Number of bytes to be read from the card. This byte should be set to 4.
        `pReadData` - Pointer to a buffer that receives the data read from the protection memory of the card.
        `pIntReturnLen` - Pointer to the length, in bytes, of the pReadData parameter and receives the actual number of bytes received from the card
      Returns:
        zero for success.

    - #### SLE4442Cmd_WriteProtectionMemory

          public int SLE4442Cmd_WriteProtectionMemory(byte bAddress,
                                                      byte bData)

      SLE4442CmdWriteProtectionMemory write one byte data in the protection memory of the card.
      Parameters:
        `bAddress` - The protection memory address to be written.
        `bData` - The written data.
      Returns:
        zero for success.

    - #### SLE4442Cmd_ReadSecurityMemory

          public int SLE4442Cmd_ReadSecurityMemory(byte bReadLen,
                                                   byte[] pReadData,
                                                   int[] pIntReturnLen)

      SLE4442Cmd_ReadSecurityMemory reads data from the security memory of the card.
      Parameters:
        `bReadLen` - Number of bytes to be read from the card. This byte should be set to 4.
        `pReadData` - Pointer to a buffer that receives the data read from the the security memory of the card.
        `pIntReturnLen` - Pointer to the length, in bytes, of the pReadData parameter and receives the actual number of bytes received from the card.
      Returns:
        zero for success.

    - #### SLE4442Cmd_UpdateSecurityMemory

          public int SLE4442Cmd_UpdateSecurityMemory(byte bAddress,
                                                     byte bData)

      SLE4442CmdUpdateSecurityMemory updates one byte data in the main memory of the card.
      Parameters:
        `bAddress` - The security memory address to update
        `bData` - The updated data.
      Returns:
        zero for success.

    - #### SLE4442Cmd_CompareVerificationData

          public int SLE4442Cmd_CompareVerificationData(byte bAddress,
                                                        byte bData)

      SLE4442Cmd_CompareVerificationData compares the data with the specified reference byte in the security memory.
      Parameters:
        `bAddress` - The security memory address whose value is to be compared. bAddress is 1, 2, or 3.
        `bData` - The compared data.
      Returns:
        zero for success.

    - #### SLE4442Cmd_Verify

          public int SLE4442Cmd_Verify(int intPinLen,
                                       byte[] pPinData)

      SLE4442Cmd_Verify Verify the pin of the card. Only apply to SLE4442
      Parameters:
        `intPinLen` - The length of pin data.
        `pPinData` - The data of pin buffer.
      Returns:
        zero for success.