Class UsbSmartCardConnection

  • All Implemented Interfaces:
    com.yubico.yubikit.core.smartcard.SmartCardConnection, com.yubico.yubikit.core.YubiKeyConnection, java.io.Closeable, java.lang.AutoCloseable

    public class UsbSmartCardConnection
    extends java.lang.Object
    implements com.yubico.yubikit.core.smartcard.SmartCardConnection
    USB service for interacting with the YubiKey https://www.usb.org/sites/default/files/DWG_Smart-Card_CCID_Rev110.pdf
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      com.yubico.yubikit.core.Transport getTransport()  
      boolean isExtendedLengthApduSupported()
      This connection generally supports Extended length APDUs.
      byte[] sendAndReceive​(byte[] apdu)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.io.Closeable

        close
    • Method Detail

      • getTransport

        public com.yubico.yubikit.core.Transport getTransport()
        Specified by:
        getTransport in interface com.yubico.yubikit.core.smartcard.SmartCardConnection
      • isExtendedLengthApduSupported

        public boolean isExtendedLengthApduSupported()
        This connection generally supports Extended length APDUs. This can be limited by firmware version of connected YubiKey.
        Specified by:
        isExtendedLengthApduSupported in interface com.yubico.yubikit.core.smartcard.SmartCardConnection
      • sendAndReceive

        public byte[] sendAndReceive​(byte[] apdu)
                              throws java.io.IOException
        Specified by:
        sendAndReceive in interface com.yubico.yubikit.core.smartcard.SmartCardConnection
        Throws:
        java.io.IOException
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable