mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
Reformat nfcVerifyPIN
This commit is contained in:
parent
284ae594bb
commit
84deba9886
@ -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!");
|
||||||
|
Loading…
Reference in New Issue
Block a user