createKeylessMdocCredentialWithSampleData
suspend fun createKeylessMdocCredentialWithSampleData(document: Document, dsKey: AsymmetricKey.X509Certified, signedAt: Instant, validFrom: Instant, validUntil: Instant, expectedUpdate: Instant? = null, domain: String = "mdoc_keyless", randomProvider: Random = Crypto.secureRandom, includeElement: (namespaceName: String, dataElement: MdocDataElement) -> Boolean = { _, _ -> true }): KeylessMdocCredential
Adds a KeylessMdocCredential to a Document with sample data for the document type.
Return
the KeylessMdocCredential that was added to document.
Parameters
document
the Document to add the credential to.
dsKey
the key to sign the MSO with and its certificate chain.
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.
randomProvider
random number generator to use.
includeElement
predicate to filter which elements are included.