StaticAuthDataGenerator

class StaticAuthDataGenerator(digestIdMapping: Map<String, List<ByteArray>>, encodedIssuerAuth: ByteArray)

Helper class for building StaticAuthData CBOR with the following CDDL:

StaticAuthData = {
"digestIdMapping": DigestIdMapping,
"issuerAuth" : IssuerAuth
}

DigestIdMapping = {
NameSpace => [ + IssuerSignedItemMetadataBytes ]
}

IssuerSignedItemMetadataBytes = #6.24(bstr .cbor IssuerSignedItemMetadata)

IssuerSignedItemMetadata = {
"digestID" : uint,                           ; Digest ID for issuer data auth
"random" : bstr,                             ; Random value for issuer data auth
"elementIdentifier" : DataElementIdentifier, ; Data element identifier
"elementValue" : DataElementValueOrNull      ; Placeholder for Data element value
}

; Set to null to use value previously provisioned or non-null
; to use a per-MSO value
;
DataElementValueOrNull = null // DataElementValue   ; "//" means or in CDDL

; Defined in ISO 18013-5
;
NameSpace = String
DataElementIdentifier = String
DataElementValue = any
DigestID = uint
IssuerAuth = COSE_Sign1 ; The payload is MobileSecurityObjectBytes
*

Note that IssuerSignedItemMetadata is similar to IssuerSignedItem as defined in ISO 18013-5 with the exception that the "elementValue" is NULL.

Parameters

digestIdMapping

A non-empty mapping between a Namespace and a list of IssuerSignedItemMetadataBytes.

encodedIssuerAuth

A COSE_Sign1 object with a payload of MobileSecurityObjectBytes.

Throws

if the digestIDMapping is empty.

Constructors

Link copied to clipboard
constructor(digestIdMapping: Map<String, List<ByteArray>>, encodedIssuerAuth: ByteArray)

Functions

Link copied to clipboard

Builds the StaticAuthData CBOR.