addDocument

open fun addDocument(@NonNull deviceResponseGenerator: DeviceResponseGenerator, @NonNull docType: String, @NonNull credentialDataResult: CredentialDataResult, @NonNull issuerSignedMapping: Map<String, List<Array<Byte>>>, @Nullable errors: Map<String, Map<String, Long>>, @NonNull encodedIssuerAuth: Array<Byte>): DeviceResponseGenerator

Like addDocument but takes a CredentialDataResult instead and merges the results into the "elementValue" entry of each IssuerSignedItem value.

Note: The issuerSignedData and encodedIssuerAuth are parameters usually obtained via org.multipaz.mdoc.mso.StaticAuthDataParser.

Return

the generator.

Parameters

deviceResponseGenerator

The generator to add the document to.

docType

The type of the document to send.

credentialDataResult

The device- and issuer-signed data elements to include.

issuerSignedMapping

A mapping from namespaces to an array of IssuerSignedItemBytes CBOR for the namespace. The "elementValue" value in each IssuerSignedItem CBOR must be set to the NULL value.

encodedIssuerAuth

the bytes of COSE_Sign1 signed by the issuing authority and where the payload is set to MobileSecurityObjectBytes.