Record Class CredentialConfirmationPolicy

java.lang.Object
java.lang.Record
zeroecho.pki.api.confirmation.CredentialConfirmationPolicy
Record Components:
disclosurePolicy - disclosure state frozen by issuance
confirmationWindow - positive confirmation interval, at most 100 years
proofSuite - exact proof-suite configuration frozen by issuance

public record CredentialConfirmationPolicy(ConfirmationDisclosurePolicy disclosurePolicy, Duration confirmationWindow, ConfirmationProofSuiteRef proofSuite) extends Record
Immutable issuance-profile policy for credential confirmation.

The commitment is a domain-separated canonical SHA-256 digest of the disclosure policy, exact confirmation window, and exact proof-suite reference. Runtime and client-provided state are deliberately excluded.

  • Field Details

    • MAXIMUM_CONFIRMATION_WINDOW

      public static final Duration MAXIMUM_CONFIRMATION_WINDOW
      Largest accepted confirmation window.
  • Constructor Details

  • Method Details

    • configurationCommitment

      public String configurationCommitment()
      Returns the canonical lowercase hexadecimal SHA-256 policy commitment.
      Returns:
      64-character policy commitment
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • disclosurePolicy

      public ConfirmationDisclosurePolicy disclosurePolicy()
      Returns the value of the disclosurePolicy record component.
      Returns:
      the value of the disclosurePolicy record component
    • confirmationWindow

      public Duration confirmationWindow()
      Returns the value of the confirmationWindow record component.
      Returns:
      the value of the confirmationWindow record component
    • proofSuite

      public ConfirmationProofSuiteRef proofSuite()
      Returns the value of the proofSuite record component.
      Returns:
      the value of the proofSuite record component