Interface OtpConnection

All Superinterfaces:
AutoCloseable, 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 final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    receive(byte[] report)
    Read an 8 byte feature report from the YubiKey
    void
    send(byte[] report)
    Writes an 8 byte feature report to the YubiKey.

    Methods inherited from interface java.io.Closeable

    close
  • Field Details

  • Method Details

    • send

      void send(byte[] report) throws IOException
      Writes an 8 byte feature report to the YubiKey.
      Parameters:
      report - the feature report data to write.
      Throws:
      IOException - in case of a write failure
    • receive

      void receive(byte[] report) throws IOException
      Read an 8 byte feature report from the YubiKey
      Parameters:
      report - a buffer to read into
      Throws:
      IOException - in case of a read failure