createMdocCredentialWithSampleData
suspend fun createMdocCredentialWithSampleData(document: Document, secureArea: SecureArea, createKeySettings: CreateKeySettings, dsKey: EcPrivateKey, dsCertChain: X509CertChain, signedAt: Instant, validFrom: Instant, validUntil: Instant, expectedUpdate: Instant? = null, domain: String = "mdoc"): MdocCredential
Adds a MdocCredential to a Document with sample data for the document type.
Return
the MdocCredential that was added to document.
Parameters
document
the Document to add the credential to.
secureArea
the SecureArea to use for DeviceKey
.
createKeySettings
the CreateKeySettings to use.
dsKey
the key to sign the MSO with.
dsCertChain
the certification for dsKey
signedAt
the time the MSO was signed.
validFrom
the time at which the credential is valid from.
validUntil
the time at which the credential is valid until.
expectedUpdate
the time at which to expect an update, or null
.
domain
the domain to use for the credential.