Class PTEID_Pin


  • public class PTEID_Pin
    extends PTEID_Object
    Class that represent one Pin.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long ADDR_PIN
      PIN reference value for the address PIN.
      static long AUTH_PIN
      PIN reference value for the authentication PIN.
      static long SIGN_PIN
      PIN reference value for the signature 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 pin
      long getId()
      Get the id of the pin
      long getIndex()
      Get the index of the pin
      java.lang.String getLabel()
      Get the label of the pin
      java.lang.String getLabelById​(long id)
      Get the label of the pin by Id
      long getPinRef()
      Get the pinref value of the pin
      int getTriesLeft()
      Return the remaining tries for entering the correct pin.


      long getType()
      Get the type of the pin
      PTEID_PinUsage getUsageCode()
      Get the usage code of the pin
      boolean 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.

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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

      • getLabelById

        public java.lang.String getLabelById​(long id)
        Get the label of the pin by Id
      • 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 code
        csPin2 - is the new pin code
        ulRemaining - return the remaining tries (only when operation failed)

        Returns:
        true if success and false if failed
        Throws:
        PTEID_Exception