Class EngagementParser.Engagement

  • Enclosing class:
    EngagementParser

    public class EngagementParser.Engagement
    extends java.lang.Object
    An object used to represent data extract from an Engagement structure.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<ConnectionMethod> getConnectionMethods()
      Gets the connection methods listed in the engagement.
      java.security.PublicKey getESenderKey()
      Gets the ephemeral key used by the other side.
      byte[] getESenderKeyBytes()
      Gets the encoding of the key that was sent from the other side.
      java.util.List<OriginInfo> getOriginInfos()
      Gets the origin infos listed in the engagement.
      java.lang.String getVersion()
      Gets the version string set in the Engagement CBOR.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getVersion

        @NonNull
        public java.lang.String getVersion()
        Gets the version string set in the Engagement CBOR.
        Returns:
        the version string in the engagement e.g. "1.0" or "1.1".
      • getESenderKey

        @NonNull
        public java.security.PublicKey getESenderKey()
        Gets the ephemeral key used by the other side.
        Returns:
        The ephemeral key used by the device (when parsing DeviceEngagement) or the reader (when generating ReaderEngagement).
      • getESenderKeyBytes

        @NonNull
        public byte[] getESenderKeyBytes()
        Gets the encoding of the key that was sent from the other side.

        The returned data are the bytes of ESenderKeyBytes which is defined as #6.24(bstr .cbor ESenderKey) where ESenderKey is a COSE_Key.

        Returns:
        The encoding of the ephemeral reader key that was sent from the mdoc (when parsing DeviceEngagement) or the mdoc reader (when generating ReaderEngagement).
      • getConnectionMethods

        @NonNull
        public java.util.List<ConnectionMethod> getConnectionMethods()
        Gets the connection methods listed in the engagement.
        Returns:
        a list of ConnectionMethod-derived instances.
      • getOriginInfos

        @NonNull
        public java.util.List<OriginInfo> getOriginInfos()
        Gets the origin infos listed in the engagement.
        Returns:
        A list of OriginInfo-derived instances.