Interface SmartCardConnection
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
,YubiKeyConnection
public interface SmartCardConnection extends YubiKeyConnection
A connection capable of sending APDUs and receiving their responses.
-
Method Summary
Modifier and Type Method Description Transport
getTransport()
Checks what transport the connection is using (USB or NFC).byte[]
sendAndReceive(byte[] apdu)
Sends a command APDU to the YubiKey, and reads a response.
-
Method Details
-
sendAndReceive
byte[] sendAndReceive(byte[] apdu) throws java.io.IOExceptionSends a command APDU to the YubiKey, and reads a response.- Parameters:
apdu
- The binary APDU data to be sent.- Returns:
- The response back from the YubiKey.
- Throws:
java.io.IOException
- in case of communication error
-
getTransport
Transport getTransport()Checks what transport the connection is using (USB or NFC).- Returns:
- the physical transport used for the connection.
-