nfc: use proper hex encoding for pin length

Fixes #886
This commit is contained in:
Vincent Breitmoser 2014-09-26 00:38:43 +02:00
parent f48db5a005
commit 4ccb26d2e5

View File

@ -208,7 +208,7 @@ public class NfcActivity extends ActionBarActivity {
+ "20" // INS + "20" // INS
+ "00" // P1 + "00" // P1
+ "82" // P2 (PW1) + "82" // P2 (PW1)
+ String.format("%02d", mPin.length()) // Lc + String.format("%02x", mPin.length()) // Lc
+ Hex.toHexString(mPin.getBytes()); + Hex.toHexString(mPin.getBytes());
if ( ! card(login).equals(accepted)) { // login if ( ! card(login).equals(accepted)) { // login
toast("Wrong PIN!"); toast("Wrong PIN!");