createForExistingAlias

suspend fun createForExistingAlias(document: Document, asReplacementForIdentifier: String?, domain: String, secureArea: SecureArea, docType: String, existingKeyAlias: String): MdocCredential

Create a MdocCredential using a key that already exists.

Return

an uncertified Credential which has been added to document.

Parameters

document

The document to add the credential to.

asReplacementForIdentifier

the identifier for the Credential this will replace when certified.

domain

The domain for the credential.

secureArea

The SecureArea to use for creating a key.

docType

The docType for the credential.

existingKeyAlias

the alias for the existing key in secureArea.