Reformat nfcVerifyPIN

This commit is contained in:
Dominik Schürmann 2015-04-15 09:50:34 +02:00
parent 284ae594bb
commit 84deba9886

View File

@ -433,12 +433,12 @@ public abstract class BaseNfcActivity extends BaseActivity {
// Command APDU for VERIFY command (page 32) // Command APDU for VERIFY command (page 32)
String login = String login =
"00" // CLA "00" // CLA
+ "20" // INS + "20" // INS
+ "00" // P1 + "00" // P1
+ String.format("%02x", mode) // P2 + String.format("%02x", mode) // P2
+ String.format("%02x", pin.length) // Lc + String.format("%02x", pin.length) // Lc
+ Hex.toHexString(pin); + Hex.toHexString(pin);
if (!nfcCommunicate(login).equals(accepted)) { // login if (!nfcCommunicate(login).equals(accepted)) { // login
handlePinError(); handlePinError();
throw new IOException("Bad PIN!"); throw new IOException("Bad PIN!");