|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecebs.rtd.enabler.common.APDUUtils
public class APDUUtils
Provides utility methods for helping carrying out card operations.
Method Summary | |
---|---|
static byte[] |
constructAPDU(byte CLA,
byte INS,
byte P1,
byte P2,
byte[] data)
Creates a byte array containg a valid APDU based on the supplied parameters. |
static byte[] |
constructAPDU(byte CLA,
byte INS,
byte P1,
byte P2,
byte[] data,
byte Le)
Creates a byte array containg a valid APDU based on the supplied parameters. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static byte[] constructAPDU(byte CLA, byte INS, byte P1, byte P2, byte[] data)
Lc
will be determined by the size of data
. If data == null
,
Lc
will be omitted. If the payload is greater that 255 bytes, only the first
255 bytes will be inserted in to the created APDU.
CLA
- Instruction classINS
- Instruction codeP1
- Instruction parameters for the command (1st byte)P2
- Instruction parameters for the command (2nd byte)data
- Payload to be sent
public static byte[] constructAPDU(byte CLA, byte INS, byte P1, byte P2, byte[] data, byte Le)
Lc
will be determined by the size of data
. If data == null
,
Lc
will be set to 0. If the payload is greater that 255 bytes, only the first
255 bytes will be inserted in to the created APDU.
CLA
- Instruction classINS
- Instruction codeP1
- Instruction parameters for the command (1st byte)P2
- Instruction parameters for the command (2nd byte)data
- Payload to be sentLe
- Maximum number of response bytes expected
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |