Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. private static final byte[] CLA_INS_P1_P2 = { 0x00, (byte)0xA4, 0x04, 0x00 };
  2. private static final byte[] AID_ANDROID = { (byte)0xF0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
  3.  
  4. public IsoDepTamaCommunicator(ByteArrayReader reader, ByteArrayWriter writer) {
  5. super(reader, writer);
  6. }
  7.  
  8. private byte[] createSelectAidApdu(byte[] aid) {
  9. byte[] result = new byte[6 + aid.length];
  10. System.arraycopy(CLA_INS_P1_P2, 0, result, 0, CLA_INS_P1_P2.length);
  11. result[4] = (byte)aid.length;
  12. System.arraycopy(aid, 0, result, 5, aid.length);
  13. result[result.length - 1] = 0;
  14. return result;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement