Package pt.gov.cartaodecidadao
Class PTEID_Pin
- java.lang.Object
-
- pt.gov.cartaodecidadao.PTEID_Object
-
- pt.gov.cartaodecidadao.PTEID_Pin
-
public class PTEID_Pin extends PTEID_Object
Class that represent one Pin.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
changePin(java.lang.String csPin1, java.lang.String csPin2, PTEID_ulwrapper ulRemaining, java.lang.String PinName, boolean bShowDlg)
Ask the card to change the pin.
if csPin1 or csPin2 are empty, a popup will ask for the codes.
void
delete()
long
getFlags()
Get the flags of the pinlong
getId()
Get the id of the pinlong
getIndex()
Get the index of the pinjava.lang.String
getLabel()
Get the label of the pinjava.lang.String
getLabelById(long id)
Get the label of the pin by Idlong
getPinRef()
Get the pinref value of the pinint
getTriesLeft()
Return the remaining tries for entering the correct pin.
long
getType()
Get the type of the pinPTEID_PinUsage
getUsageCode()
Get the usage code of the pinboolean
isVerified()
Check the current verification status of the PIN
boolean
unlockPin(java.lang.String pszPuk, java.lang.String pszNewPin, PTEID_ulwrapper triesLeft, long flags)
boolean
verifyPin(java.lang.String csPin, PTEID_ulwrapper ulRemaining, boolean bShowDlg)
Ask the card to verify the pin.
-
-
-
Field Detail
-
AUTH_PIN
public static final long AUTH_PIN
PIN reference value for the authentication PIN. It can be used as parameter for PTEID_Pins::getPinByPinRef()
-
SIGN_PIN
public static final long SIGN_PIN
PIN reference value for the signature PIN. It can be used as parameter for PTEID_Pins::getPinByPinRef()
-
ADDR_PIN
public static final long ADDR_PIN
PIN reference value for the address PIN. It can be used as parameter for PTEID_Pins::getPinByPinRef()
-
-
Method Detail
-
delete
public void delete()
- Overrides:
delete
in classPTEID_Object
-
getIndex
public long getIndex() throws PTEID_Exception
Get the index of the pin- Throws:
PTEID_Exception
-
getType
public long getType() throws PTEID_Exception
Get the type of the pin- Throws:
PTEID_Exception
-
getId
public long getId() throws PTEID_Exception
Get the id of the pin- Throws:
PTEID_Exception
-
getPinRef
public long getPinRef() throws PTEID_Exception
Get the pinref value of the pin- Throws:
PTEID_Exception
-
getUsageCode
public PTEID_PinUsage getUsageCode() throws PTEID_Exception
Get the usage code of the pin- Throws:
PTEID_Exception
-
getFlags
public long getFlags() throws PTEID_Exception
Get the flags of the pin- Throws:
PTEID_Exception
-
getLabel
public java.lang.String getLabel() throws PTEID_Exception
Get the label of the pin- Throws:
PTEID_Exception
-
getLabelById
public java.lang.String getLabelById(long id)
Get the label of the pin by Id
-
unlockPin
public boolean unlockPin(java.lang.String pszPuk, java.lang.String pszNewPin, PTEID_ulwrapper triesLeft, long flags) throws PTEID_Exception
- Throws:
PTEID_Exception
-
getTriesLeft
public int getTriesLeft() throws PTEID_Exception
Return the remaining tries for entering the correct pin.
- Returns:
- the number of remaining tries in the other case
- Throws:
PTEID_Exception
-
isVerified
public boolean isVerified() throws PTEID_Exception
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(java.lang.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(java.lang.String csPin1, java.lang.String csPin2, PTEID_ulwrapper ulRemaining, java.lang.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
-
-