|
Java Card 2.1 Platform Final Revision 1.0 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents a PIN. An implementation must maintain these internal values:
PIN
becomes blocked.
An owner implementation of this interface must provide a way to initialize/update the PIN value.The owner implemention of the interface must protect against attacks based on program flow prediction. Even if a transaction is in progress, internal state such as the try counter, the validated flag and the blocking state must not be conditionally updated during PIN presentation.
A typical card global PIN usage will combine an instance of OwnerPIN
class and a
a Proxy PIN interface which implements both the PIN
and the Shareable
interfaces.
The OwnerPIN
instance would be manipulated only by the owner who has update privilege.
All others would access the global PIN functionality via the proxy PIN interface.
OwnerPIN
,
Shareable
Method Summary | |
boolean |
check(byte[] pin,
short offset,
byte length)
Compares pin against the PIN value. |
byte |
getTriesRemaining()
Returns the number of times remaining that an incorrect PIN can be presented before the PIN is blocked. |
boolean |
isValidated()
Returns true if a valid PIN value has been presented since the last
card reset or last call to reset() . |
void |
reset()
If the validated flag is set, this method resets it. |
Method Detail |
public byte getTriesRemaining()
PIN
is blocked.public boolean check(byte[] pin, short offset, byte length)
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, internal state
such as the try counter, the validated flag and the blocking state
must not be conditionally updated.pin
- the byte array containing the PIN value being checkedoffset
- the starting offset in the pin arraylength
- the length of the PIN value.true
if the PIN value matches; false
otherwisepublic boolean isValidated()
true
if a valid PIN value has been presented since the last
card reset or last call to reset()
.true
if validated; false
otherwisepublic void reset()
|
Submit a bug or feature Java and Java Card are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-1999 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |