MobileSecurityObjectGenerator
Helper class for building MobileSecurityObject
CBOR as specified ISO/IEC 18013-5:2021 section 9.1.2 Issuer data authentication
Parameters
The digest algorithm identifier. Must be one of {Algorithm.SHA256, Algorithm.SHA-384, Algorithm.SHA-512}.
The document type.
The public part of the key pair used for mdoc authentication.
Throws
if the digestAlgorithm
is not one of {Algorithm.SHA256, Algorithm.SHA-384, Algorithm.SHA-512}.
Functions
Populates the ValueDigests
mapping. This must be called at least once before generating since ValueDigests
must be non-empty.
Populates the AuthorizedDataElements
portion of the keyAuthorizations
within DeviceKeyInfo
. This gives authorizations to data elements included in the authorizedDataElements
mapping. If a namespace is included here, then it should not be included in .setDeviceKeyAuthorizedNameSpaces
Populates the AuthorizedNameSpaces
portion of the keyAuthorizations
within DeviceKeyInfo
. This gives authorizations to full namespaces included in the authorizedNameSpaces
array. If authorization is given for a full namespace, that namespace shall not be included in .setDeviceKeyAuthorizedDataElements.
Provides extra info for the mdoc authentication public key as part of the KeyInfo
portion of the DeviceKeyInfo
.
Sets the ValidityInfo
structure which contains information related to the validity of the MSO and its signature. This must be called before generating since this a required component of the MobileSecurityObject
.