Class ApduResponse

java.lang.Object
com.yubico.yubikit.core.smartcard.ApduResponse

public class ApduResponse
extends java.lang.Object
An APDU response from a YubiKey, comprising response data, and a status code.
  • Constructor Summary

    Constructors 
    Constructor Description
    ApduResponse​(byte[] bytes)
    Creates a new response from a key
  • Method Summary

    Modifier and Type Method Description
    byte[] getBytes()  
    byte[] getData()  
    short getSw()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ApduResponse

      public ApduResponse​(byte[] bytes)
      Creates a new response from a key
      Parameters:
      bytes - data received from key within session/service provider
  • Method Details

    • getSw

      public short getSw()
      Returns:
      the SW from a key response (see SW).
    • getData

      public byte[] getData()
      Returns:
      the data from a key response without the SW.
    • getBytes

      public byte[] getBytes()
      Returns:
      raw data from a key response