Class DeviceResponseParser


  • public final class DeviceResponseParser
    extends java.lang.Object
    Helper class for parsing the bytes of DeviceResponse CBOR as specified in ISO/IEC 18013-5 section 8.3 Device Retrieval.
    • Method Detail

      • setDeviceResponse

        @NonNull
        public DeviceResponseParser setDeviceResponse​(@NonNull
                                                      byte[] encodedDeviceResponse)
        Sets the bytes of the DeviceResponse CBOR.
        Parameters:
        encodedDeviceResponse - the bytes of DeviceResponse.
        Returns:
        the DeviceResponseParser.
      • setSessionTranscript

        @NonNull
        public DeviceResponseParser setSessionTranscript​(@NonNull
                                                         byte[] encodedSessionTranscript)
        Sets the bytes of the SessionTranscript CBOR.
        Parameters:
        encodedSessionTranscript - the bytes of SessionTranscript.
        Returns:
        the DeviceResponseParser.
      • setEphemeralReaderKey

        @NonNull
        public DeviceResponseParser setEphemeralReaderKey​(@NonNull
                                                          java.security.PrivateKey eReaderKey)
        Sets the private part of the ephemeral key used in the session where the DeviceResponse was obtained.

        This is only required if the DeviceResponse is using the MAC method for device authentication.

        Parameters:
        eReaderKey - the private part of the reader ephemeral key.
        Returns:
        the DeviceResponseParser.