public class BACProtocol extends Object
Constructor and Description |
---|
BACProtocol(PassportService service)
Constructs a BAC protocol instance.
|
Modifier and Type | Method and Description |
---|---|
BACResult |
doBAC(BACKeySpec bacKey)
Performs the Basic Access Control protocol.
|
BACResult |
doBAC(SecretKey kEnc,
SecretKey kMac)
Performs the Basic Access Control protocol.
|
public BACProtocol(PassportService service)
service
- the service to send APDUspublic BACResult doBAC(BACKeySpec bacKey) throws net.sf.scuba.smartcards.CardServiceException
bacKey
- the key based on the document number,
the card holder's birth date,
and the document's expiry datenet.sf.scuba.smartcards.CardServiceException
- if authentication failedpublic BACResult doBAC(SecretKey kEnc, SecretKey kMac) throws net.sf.scuba.smartcards.CardServiceException, GeneralSecurityException
kEnc
- static 3DES key required for BACkMac
- static 3DES key required for BACnet.sf.scuba.smartcards.CardServiceException
- if authentication failedGeneralSecurityException
- on security primitives related problemsCopyright © 2016. All rights reserved.