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.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      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
    • Method Detail

      • send

        void send​(byte[] report)
           throws java.io.IOException
        Writes 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.IOException
        Read 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