Package pt.gov.cartaodecidadao
Class PTEID_Pin
java.lang.Object
pt.gov.cartaodecidadao.PTEID_Object
pt.gov.cartaodecidadao.PTEID_Pin
Class that represent one card PIN.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longPIN reference value for the address PIN.static final longPIN reference value for the authentication PIN.
It can be used as parameter for PTEID_Pins::getPinByPinRef()static final longPIN reference value for the signature PIN.static final intFlags available for PTEID_Pin::unlockPinstatic final int -
Method Summary
Modifier and TypeMethodDescriptionbooleanchangePin(String csPin1, String csPin2, PTEID_ulwrapper ulRemaining, String PinName, boolean bShowDlg) Ask the card to change the pin.
if csPin1 or csPin2 are empty, a popup will ask for the codes.
voiddelete()longgetFlags()Get the flags of the pinlonggetId()Get the id of the pinlonggetIndex()Get the index of the pingetLabel()Get the label of the pingetLabelById(long id) Get the label of the pin by IdlongGet the pinref value of the pinintReturn the remaining tries for entering the correct pin.
longgetType()Get the type of the pinGet the usage code of the pinbooleanCheck the current verification status of the PIN
booleanunlockPin(String pszPuk, String pszNewPin, PTEID_ulwrapper triesLeft, long flags) booleanverifyPin(String csPin, PTEID_ulwrapper ulRemaining, boolean bShowDlg) Ask the card to verify the pin.
-
Field Details
-
AUTH_PIN
public static final long AUTH_PINPIN reference value for the authentication PIN.
It can be used as parameter for PTEID_Pins::getPinByPinRef() -
SIGN_PIN
public static final long SIGN_PINPIN reference value for the signature PIN. It can be used as parameter for PTEID_Pins::getPinByPinRef() -
ADDR_PIN
public static final long ADDR_PINPIN reference value for the address PIN. It can be used as parameter for PTEID_Pins::getPinByPinRef() -
UNBLOCK_FLAG_NEW_PIN
public static final int UNBLOCK_FLAG_NEW_PINFlags available for PTEID_Pin::unlockPin -
UNBLOCK_FLAG_PUK_MERGE
public static final int UNBLOCK_FLAG_PUK_MERGE
-
-
Method Details
-
delete
public void delete()- Overrides:
deletein classPTEID_Object
-
getIndex
Get the index of the pin- Throws:
PTEID_Exception
-
getType
Get the type of the pin- Throws:
PTEID_Exception
-
getId
Get the id of the pin- Throws:
PTEID_Exception
-
getPinRef
Get the pinref value of the pin- Throws:
PTEID_Exception
-
getUsageCode
Get the usage code of the pin- Throws:
PTEID_Exception
-
getFlags
Get the flags of the pin- Throws:
PTEID_Exception
-
getLabel
Get the label of the pin- Throws:
PTEID_Exception
-
getLabelById
Get the label of the pin by Id -
unlockPin
public boolean unlockPin(String pszPuk, String pszNewPin, PTEID_ulwrapper triesLeft, long flags) throws PTEID_Exception - Throws:
PTEID_Exception
-
getTriesLeft
Return the remaining tries for entering the correct pin.
- Returns:
- the number of remaining tries in the other case
- Throws:
PTEID_Exception
-
isVerified
Check the current verification status of the PIN
- Returns:
- true if the PIN has already been successfully presented during the current card session or false
otherwise - Throws:
PTEID_Exception
-
verifyPin
public boolean verifyPin(String csPin, PTEID_ulwrapper ulRemaining, boolean bShowDlg) throws PTEID_Exception Ask the card to verify the pin.
- Parameters:
csPin- is the pin code to verify (if csPin is empty, a popup will ask for the code)ulRemaining- return the remaining tries (only if verifying failed)bShowDlg- flag used to either show or not a dialog where the user inserts the pin (default=true)
- Returns:
- true if success and false if failed
- Throws:
PTEID_Exception
-
changePin
public boolean changePin(String csPin1, String csPin2, PTEID_ulwrapper ulRemaining, String PinName, boolean bShowDlg) throws PTEID_Exception Ask the card to change the pin.
if csPin1 or csPin2 are empty, a popup will ask for the codes.
- Parameters:
csPin1- is the old pin codecsPin2- is the new pin codeulRemaining- return the remaining tries (only when operation failed)
- Returns:
- true if success and false if failed
- Throws:
PTEID_Exception
-