Disclosure

data class Disclosure(val salt: String, val claimName: String?, val claimValue: JsonElement, val disclosureString: String)

Represents a parsed SD-JWT disclosure according to RFC 9901 Section 5.1.

A disclosure is either:

  • An object property disclosure: [salt, claimName, claimValue]

  • An array element disclosure: [salt, claimValue]

Constructors

Link copied to clipboard
constructor(salt: String, claimName: String?, claimValue: JsonElement, disclosureString: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

the name of the claim, or null if this is an array element disclosure.

Link copied to clipboard
val claimValue: JsonElement

the selectively disclosable claim value.

Link copied to clipboard

the base64url-encoded JSON array string.

Link copied to clipboard

true if this disclosure is for an array element, false if for an object property.

Link copied to clipboard

the random salt string.

Functions

Link copied to clipboard
suspend fun calculateDigest(digestAlgorithm: Algorithm): String

Calculates the base64url-encoded digest of this disclosure using the given digestAlgorithm.

Link copied to clipboard

Validates the internal structure and contents of this Disclosure according to RFC 9901.