DisclosureUtil

Helper extensions related to disclosures.

Functions

Link copied to clipboard
suspend fun JsonObjectBuilder.putClaimDisclosureDigests(disclosures: List<JsonArray>, digestAlgorithm: Algorithm): JsonObjectBuilder

Creates and inserts the digests for selectively disclosable object properties into a JSON Object as defined SD-JWT 4.2.4.1.

Link copied to clipboard
suspend fun JsonArray.toArrayDigestElement(digestAlgorithm: Algorithm): JsonObject

Creates the appropriate JSON Object for a Digest being inserted into a JsonArray.

Link copied to clipboard
fun JsonElement.toArrayDisclosure(salt: String): JsonArray

Creates a disclosure for a JsonElement in a JsonArray as defined by SD-JWT 4.2.2.

Link copied to clipboard
suspend fun JsonArray.toClaimDigestElement(digestAlgorithm: Algorithm): JsonPrimitive

Creates the appropriate JSON Primitive for a Digest being inserted into a JSON Object.

Link copied to clipboard
fun JsonElement.toClaimDisclosure(claimName: String, salt: String): JsonArray

Creates a disclosure for a JsonElement Object Property as defined by SD-JWT 4.2.1.

Link copied to clipboard
suspend fun JsonArray.toDigest(digestAlgorithm: Algorithm): String

Creates a digest from a disclosure, using the provided digest algorithm.