com.pax.dal.memorycard

Interface ICardAT88SC153

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      void close()
      关闭 AT88SC153.
      QInfo cryptoF2_153(byte[] Ci, byte[] Gc, byte[] Q0)
      ATMEL ELVA算法
      ATMEL ELVA algorithm
      void initAuth(byte[] randNumber)
      初始化授权
      Initialize authorization.
      byte[] open()
      重置 AT88SC153.
      void progEEPROM(byte zoneNum, int bAddr, byte[] dataBlock)
      写EEPROM
      Write EEPROM.
      void progFuse(byte fsVal)
      写入熔丝字节。
      Write fuse byte.
      byte[] readEEPROM(byte zoneNum, int bAddr, int nums)
      读取EEPROM,当区号为3时,读取配置区块
      Read EEPROM.When zoneNum=3,read Configuration Zone.
      byte readFuse()
      读熔丝字节。
      Read fuse byte.
      void verifyAuth(byte[] challenge)
      验证授权
      Verify authorization.
      void verifySC(int index, int rwp, byte[] password)
      验证密码
      Verify password.
    • Method Detail

      • readEEPROM

        byte[] readEEPROM(byte zoneNum,
                          int bAddr,
                          int nums)
                   throws AT88SC153DevException
        读取EEPROM,当区号为3时,读取配置区块
        Read EEPROM.When zoneNum=3,read Configuration Zone.
        Parameters:
        zoneNum -
        要读取的区号
        the number of zone to be read
        bAddr -
        开始地址
        begin address
        nums -
        要读取的数据长度
        the length of the data to be read
        Returns:
        读取的数据
        the read data
        Throws:
        AT88SC153DevException
      • progEEPROM

        void progEEPROM(byte zoneNum,
                        int bAddr,
                        byte[] dataBlock)
                 throws AT88SC153DevException
        写EEPROM
        Write EEPROM.
        Parameters:
        zoneNum -
        要读取的区号
        the number of zone to be read
        bAddr -
        开始地址
        begin address
        dataBlock -
        要写的数据
        the data to be Written
        Throws:
        AT88SC153DevException
      • verifySC

        void verifySC(int index,
                      int rwp,
                      byte[] password)
               throws AT88SC153DevException
        验证密码
        Verify password.
        Parameters:
        index -
        密码索引
        the index of password
        rwp -
        1: 读取操作密码 0: 写操作密码
        1: read operation password 0: write operation password
        password -
        密码,3字节
        password, 3 bytes
        Throws:
        AT88SC153DevException
      • cryptoF2_153

        QInfo cryptoF2_153(byte[] Ci,
                           byte[] Gc,
                           byte[] Q0)
                    throws AT88SC153DevException
        ATMEL ELVA算法
        ATMEL ELVA algorithm
        Parameters:
        Ci -
        随机数,由卡生成,8字节
        random numbers,generated by card, 8 bytes
        Gc -
        密码子,8字节
        password seed, 8bytes
        Q0 -
        随机数,由终端产生,8字节
        random numbers,generated by terminal, 8 bytes
        Returns:
        QInfo 有两个成员: byte[] Q1, byte[] Q2
        QInfo has two members: byte[] Q1, byte[] Q2
        Throws:
        AT88SC153DevException