Pin¶
- public class Pin¶
Class represents a PIN that protects smart card contents.
Methods¶
change¶
- public void change(String oldValue, String newValue)¶
Changes the PIN. The operation can only be made against the user PIN.
- Parameters:
oldValue – The current PIN value. May be
nullif a protected authentication path existsToken.hasProtectedAuthPath().newValue – The new PIN value. May be
nullif a protected authentication path exists.
getConstraints¶
- public PinConstraint[] getConstraints()¶
Gets the format constraints of the PIN as an array of
PinConstraintobject.- Returns:
the
PinConstraintarray.
getLabel¶
getMaxTries¶
- public int getMaxTries()¶
Returns the number of maximum tries for the PIN verification. Can be undefined if the information is unavailable.
- Returns:
the number of maximum tries for the PIN verification.
getPuksAvailable¶
- public int getPuksAvailable()¶
Returns a bit field indicating availability of each PUK, with the LSB for 1st PUK. A bit at 1 indicates that the corresponding PUK is still available. Can be undefined if the information is unavailable.
- Returns:
a bit field indicating availability of each PUK.
getRemainingTries¶
- public int getRemainingTries()¶
Returns the number of remaining tries for the PIN verification. Can be undefined if the information is unavailable.
- Returns:
the number of remaining tries for the PIN verification.
getToken¶
initPin¶
- public void initPin(String newValue)¶
Reinitializes the PIN value (eventually unblocking it, if required). The operation can only be made against the user PIN, and requires the security officer PIN to be verified
Pin.login(String).- Parameters:
newValue – The new PIN value. May be
nullif a protected authentication path exists.
initPinSo¶
- public void initPinSo()¶
Unblocks the SO PIN or the PUKs, depending on the profile. This function can operate only if the appropriate access conditons have been fulfilled.
isBlocked¶
- public boolean isBlocked()¶
Returns
trueif the PIN is blocked.- Returns:
trueif the PIN is blocked;falseotherwise.
isInitialized¶
- public boolean isInitialized()¶
Returns
trueif the PIN has been initialized.- Returns:
trueif the PIN has been initialized;falseotherwise.
isToBeChanged¶
- public boolean isToBeChanged()¶
Returns
trueif the PIN need to be changed before use.- Returns:
trueif the PIN need to be changed before use;falseotherwise.
isTryCountLow¶
- public boolean isTryCountLow()¶
Returns
trueif the PIN try counter is lower than the maximum (an unsuccessful verification attempt has been made).- Returns:
trueif the PIN try counter is lower than the maximum;falseotherwise.
isValidated¶
- public boolean isValidated()¶
Returns
trueif the PIN has been successfully verified (access to the private objects is granted).- Returns:
trueif the PIN has been successfully verified;falseotherwise.
lastTry¶
- public boolean lastTry()¶
Returns
trueif the PIN try counter shows only one attempt remaining.- Returns:
trueif the PIN try counter shows only one attempt remaining;falseotherwise.
login¶
- public void login(String value)¶
Verifies the PIN.
- Parameters:
value – the PIN value. May be
nullif a protected authentication path exists(Token.hasProtectedAuthPath()).
loginSO¶
- public void loginSO(String value)¶
Verifies the Security Officer (administrator or unblocking) PIN
- Parameters:
value – the PIN value. May be
nullif a protected authentication path exists(Token.hasProtectedAuthPath()).
logout¶
- public void logout()¶
Resets the verified status of the PIN (cancels a call to
Pin.login(String)).