JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
PIN_TRY_COUNTER
PIN_TRY_COUNTER
can any one tell how to block pin in java card if pin retry counter is zero and how to decrease pin try counter.
Thanks in advance
Thanks in advance
-
- Posts: 55
- Joined: Thu Sep 22, 2016 5:05 am
- Points :784
- Contact:
Re: PIN_TRY_COUNTER
You can send the command of unblock pin or reload pin. The function is not implemented in the "WalletDemoApplet". You can only uninstall the instance.
Re: PIN_TRY_COUNTER
sir can u refer any example...to block pin and to decrease pin try counter.
-
- Posts: 55
- Joined: Thu Sep 22, 2016 5:05 am
- Points :784
- Contact:
Re: PIN_TRY_COUNTER
vishalxz wrote:sir can u refer any example...to block pin and to decrease pin try counter.
You can download LoyaltyCard-Applet-v1.0.zip in the viewtopic.php?f=17&t=1027, function is UpdatePin(APDU apdu).
-
- Posts: 24
- Joined: Sun Aug 23, 2015 11:14 pm
- Points :424
- Contact:
Re: PIN_TRY_COUNTER
for( i = 0; i < (byte)( pin_max_time - pin_current_time ); i++ )
{
PIN.check( r, (short)0x00, (byte)0x10 );
}
check several time, pin will blocked
{
PIN.check( r, (short)0x00, (byte)0x10 );
}
check several time, pin will blocked
-
- Posts: 18
- Joined: Mon Sep 18, 2017 9:52 pm
- Points :240
- Contact:
Re: PIN_TRY_COUNTER
please read documemt of javacard API: javacard.framework.OwnerPIN
to decrease try count, just call check(..) with wrong PIN, follwoing is fragment of method check ():
ublic boolean check(byte[] pin,
short offset,
byte length)
throws ArrayIndexOutOfBoundsException,
NullPointerException
Compares pin against the PIN value. If they match and the PIN is not blocked, it sets the validated flag and resets the try counter to its maximum. If it does not match, it decrements the try counter and, if the counter has reached zero, blocks the PIN. Even if a transaction is in progress, update of internal state - the try counter, the validated flag, and the blocking state, shall not participate in the transaction.
if you want unblock PIN, just call resetAndUnblock()
to decrease try count, just call check(..) with wrong PIN, follwoing is fragment of method check ():
ublic boolean check(byte[] pin,
short offset,
byte length)
throws ArrayIndexOutOfBoundsException,
NullPointerException
Compares pin against the PIN value. If they match and the PIN is not blocked, it sets the validated flag and resets the try counter to its maximum. If it does not match, it decrements the try counter and, if the counter has reached zero, blocks the PIN. Even if a transaction is in progress, update of internal state - the try counter, the validated flag, and the blocking state, shall not participate in the transaction.
if you want unblock PIN, just call resetAndUnblock()
Who is online
Users browsing this forum: No registered users and 46 guests