Class APDU

    • Field Detail

      • DEFAULT_APDU_SIZE

        public static int DEFAULT_APDU_SIZE
      • cla

        protected byte cla
      • ins

        protected byte ins
      • p1

        protected byte p1
      • p2

        protected byte p2
    • Constructor Detail

      • APDU

        public APDU()
      • APDU

        public APDU​(APDU otherAPDU)
    • Method Detail

      • setMAC

        public void setMAC​(TPSBuffer theMac)
      • setTrailer

        public void setTrailer​(TPSBuffer theTrailer)
      • getEncoding

        public TPSBuffer getEncoding()
        Retrieves APDU's encoding. The encoding of APDU is as follows: CLA 1 byte INS 1 byte P1 1 byte P2 1 byte 1 byte byte(s) 0 1 byte
        Returns:
        the result buffer which will contain the actual data including the APDU header, data, and pre-calculated mac.
      • getDataToMAC

        public TPSBuffer getDataToMAC()
      • secureMessage

        public void secureMessage​(org.mozilla.jss.pkcs11.PK11SymKey encKey,
                                  byte protocol)
                           throws EBaseException
        Throws:
        EBaseException
      • padBuffer80

        public void padBuffer80​(TPSBuffer buffer,
                                int blockSize)
      • incrementBuffer

        public void incrementBuffer​(TPSBuffer buffer)
      • secureMessageSCP02

        public void secureMessageSCP02​(org.mozilla.jss.pkcs11.PK11SymKey encKey)
                                throws EBaseException
        Throws:
        EBaseException
      • getCLA

        public byte getCLA()
      • getINS

        public byte getINS()
      • getP1

        public byte getP1()
      • getP2

        public byte getP2()
      • dump

        public void dump()