Package com.android.identity
Class EngagementParser.Engagement
- java.lang.Object
-
- com.android.identity.EngagementParser.Engagement
-
- Enclosing class:
- EngagementParser
public class EngagementParser.Engagement extends java.lang.Object
An object used to represent data extract from anEngagement
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 theEngagement
CBOR.
-
-
-
Method Detail
-
getVersion
@NonNull public java.lang.String getVersion()
Gets the version string set in theEngagement
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 generatingReaderEngagement
).
-
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)
whereESenderKey
is aCOSE_Key
.- Returns:
- The encoding of the ephemeral reader key that was sent from the mdoc
(when parsing
DeviceEngagement
) or the mdoc reader (when generatingReaderEngagement
).
-
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.
-
-