Utility

open class Utility

Miscellaneous utility functions that are useful when building mdoc applications.

Functions

Link copied to clipboard
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.
Link copied to clipboard
open fun encodeStaticAuthData(@NonNull issuerSignedMapping: Map<String, List<Array<Byte>>>, @NonNull encodedIssuerAuth: Array<Byte>): Array<Byte>
Helper to encode digest-id mapping and issuerAuth CBOR into a single byte array.
Link copied to clipboard
Merges issuer-signed data with credential result data.
Link copied to clipboard
open fun provisionMsosForExistingCredential(@Nullable c: IdentityCredential, @NonNull issuingAuthorityKey: PrivateKey, @NonNull issuingAuthorityCertificate: X509Certificate, @NonNull docType: String, @NonNull personalizationData: PersonalizationData, numAuthKeys: Int, maxUsesPerKey: Int)