Updated on 2026-08-14

This commit is contained in:
Tangem 2018-06-28 12:03:18 +03:00
parent 0fab3ec90e
commit 4e42025453
9 changed files with 123 additions and 8 deletions

View file

@ -34,12 +34,22 @@ public class ResponseApdu {
parseError = e.getMessage();
}
}else{
tlvList=new TLVList();
parseError=null;
}
mSw1 = 0x00FF & respApdu[respApdu.length - 2];
mSw2 = 0x00FF & respApdu[respApdu.length - 1];
mBytes = respApdu;
}
public static boolean isStatusWord(byte[] respApdu, int SW)
{
int mSw1 = 0x00FF & respApdu[respApdu.length - 2];
int mSw2 = 0x00FF & respApdu[respApdu.length - 1];
return ((mSw1 << 8) | mSw2)==SW;
}
public static ResponseApdu Decrypt(byte[] data, byte[] key) throws Exception{
if( data.length==2 )