Package com.yubico.yubikit.core.otp
Interface OtpConnection
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable,YubiKeyConnection
public interface OtpConnection extends YubiKeyConnection
A HID keyboard connection to a YubiKey, which uses feature reports to send and receive data.
-
Field Summary
Fields Modifier and Type Field Description static intFEATURE_REPORT_SIZE -
Method Summary
-
Field Details
-
FEATURE_REPORT_SIZE
static final int FEATURE_REPORT_SIZE- See Also:
- Constant Field Values
-
-
Method Details
-
send
void send(byte[] report) throws java.io.IOExceptionWrites an 8 byte feature report to the YubiKey.- Parameters:
report- the feature report data to write.- Throws:
java.io.IOException- in case of a write failure
-
receive
void receive(byte[] report) throws java.io.IOExceptionRead an 8 byte feature report from the YubiKey- Parameters:
report- a buffer to read into- Throws:
java.io.IOException- in case of a read failure
-