Interface CHVCardServiceWithControl

    • Method Detail

      • verifyPassword

        boolean verifyPassword​(SecurityDomain domain,
                               int number,
                               CHVControl cc,
                               byte[] password)
                        throws CardServiceException,
                               CardTerminalException
        Checks a password for card holder verification. Note that repeated verification of a wrong password will typically block that password on the smartcard.
        Parameters:
        domain - The security domain in which to verify the password. null can be passed to refer to the root domain on the smartcard.
        For file system based smartcards, the security domain is specified as a CardFilePath. The root domain then corresponds to the master file.
        number - The number of the password to verify. This parameter is used to distinguish between different passwords in the same security domain.
        cc - Control parameter defined by the application
        password - The password data that has to be verified. If the data is supplied, it has to be padded to the length returned by getPasswordLength for that password.
        null may be passed to indicate that this service should use a protected PIN path facility, if available. Alternatively, this service may query the password by some other, implementation-dependend means. In any case, the service implementation will require knowledge about the encoding of the password data on the smartcard.
        Throws:
        CardServiceException - if this service encountered an error. In this context, it is not considered an error if the password to be verified is wrong. However, if the password is blocked on the smartcard, an exception will be thrown.
        CardTerminalException - if the underlying card terminal encountered an error when communicating with the smartcard
      • getPasswordStatus

        CHVCardServiceWithControl.PasswordStatus getPasswordStatus​(SecurityDomain domain,
                                                                   int number)
                                                            throws CardServiceException,
                                                                   CardTerminalException
        Get the smartcard's password status.
        Parameters:
        domain - The security domain in which to verify the password. null can be passed to refer to the root domain on the smartcard.
        For file system based smartcards, the security domain is specified as a CardFilePath. The root domain then corresponds to the master file.
        number - The number of the password to verify. This parameter is used to distinguish between different passwords in the same security domain.
        Returns:
        The password status
        Throws:
        CardServiceException - if this service encountered an error.
        CardTerminalException - if the underlying card terminal encountered an error when communicating with the smartcard