|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CHVCardService
A card service interface for Card Holder Verification (CHV). CHV is typically performed by querying a password or PIN (Personal Identification Number) from the user and presenting it to the card for verification. The user's input has to be converted into the format understood by the smartcard, for example by BCD-packing and padding a PIN. The methods in this interface expect this converted data, which is referred to as password. Please note that there is no assumption on how the password data is obtained and preprocessed. For example, biometric scanning could be used instead of querying a PIN.
Method Summary | |
---|---|
void |
closeApplication(SecurityDomain domain)
Resets the achieved card holder verifications on the smartcard. |
int |
getPasswordLength(SecurityDomain domain,
int number)
Determines the padded length of a password. |
boolean |
verifyPassword(SecurityDomain domain,
int number,
byte[] password)
Checks a password for card holder verification. |
Methods inherited from interface opencard.opt.service.CardServiceInterface |
---|
getCard, setCHVDialog |
Method Detail |
---|
int getPasswordLength(SecurityDomain domain, int number) throws CardServiceException, CardTerminalException
domain
- The security domain in which the password resides.
null can be passed to refer to the root
domain on the smartcard.
number
- The number of the password. This parameter
is used to distinguish between different passwords
in the same security domain.
CardServiceException
- if this service encountered an error.
This may occur if the service needs to contact the smartcard
in order to determine the password length. An exception may
also be thrown if the service is unable to locate the security
domain.
CardTerminalException
- if the underlying card terminal encountered an error
when communicating with the smartcardboolean verifyPassword(SecurityDomain domain, int number, byte[] password) throws CardServiceException, CardTerminalException
domain
- The security domain in which to verify the password.
null can be passed to refer to the root
domain on the smartcard.
number
- The number of the password to verify. This parameter
is used to distinguish between different passwords
in the same security domain.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.
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 smartcardvoid closeApplication(SecurityDomain domain) throws CardServiceException, CardTerminalException
The name of this method implies that an application on the smartcard is first selected and then opened by performing card holder verification, giving access to the application data. By resetting the card holder verification, the on-card application therefore gets closed.
domain
- the security domain for which to reset card holder
verifications
CardServiceException
- if this service, or the underlying implementation,
encountered an error
CardTerminalException
- if the underlying terminal encountered an error while
communicating with the smartcard
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |