Package com.android.identity
Class EngagementGenerator
- java.lang.Object
-
- com.android.identity.EngagementGenerator
-
public final class EngagementGenerator extends java.lang.ObjectHelper to generateDeviceEngagementorReaderEngagementCBOR.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringENGAGEMENT_VERSION_1_0static java.lang.StringENGAGEMENT_VERSION_1_1
-
Constructor Summary
Constructors Constructor Description EngagementGenerator(java.security.PublicKey ESenderKey, java.lang.String version)Helper class for building Engagement structures.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]generate()Generates the binary Engagement structure.EngagementGeneratorsetConnectionMethods(java.util.List<ConnectionMethod> connectionMethods)Adds a connection method to the engagement.EngagementGeneratorsetOriginInfos(java.util.List<OriginInfo> originInfos)Adds origin infos to the engagement.
-
-
-
Field Detail
-
ENGAGEMENT_VERSION_1_0
public static final java.lang.String ENGAGEMENT_VERSION_1_0
- See Also:
- Constant Field Values
-
ENGAGEMENT_VERSION_1_1
public static final java.lang.String ENGAGEMENT_VERSION_1_1
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EngagementGenerator
public EngagementGenerator(@NonNull java.security.PublicKey ESenderKey, @NonNull java.lang.String version)Helper class for building Engagement structures.- Parameters:
ESenderKey- The ephemeral key used by the device (when generatingDeviceEngagement) or the reader (when generatingReaderEngagement).version- the version to use.
-
-
Method Detail
-
setConnectionMethods
@NonNull public EngagementGenerator setConnectionMethods(@NonNull java.util.List<ConnectionMethod> connectionMethods)
Adds a connection method to the engagement.- Parameters:
connectionMethods- A list with instances derived fromConnectionMethod.- Returns:
- the generator.
-
setOriginInfos
@NonNull public EngagementGenerator setOriginInfos(@NonNull java.util.List<OriginInfo> originInfos)
Adds origin infos to the engagement.- Parameters:
originInfos- A list with instances derived fromOriginInfo.- Returns:
- the generator.
-
generate
@NonNull public byte[] generate()
Generates the binary Engagement structure.- Returns:
- the bytes of the
Engagementstructure.
-
-