Record Class KeyPossessionProofPresentation

java.lang.Object
java.lang.Record
zeroecho.pki.spi.confirmation.KeyPossessionProofPresentation
Record Components:
canonicalBytes - non-empty canonical suite presentation

public record KeyPossessionProofPresentation(byte[] canonicalBytes) extends Record
Immutable bounded canonical challenge presentation produced by a proof provider.

The byte representation is suite-defined. Input and output arrays are defensively copied, and the payload is never included in toString().

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Maximum canonical presentation length in bytes.
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyPossessionProofPresentation(byte[] canonicalBytes)
    Validates and defensively owns the presentation.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Returns a defensive copy of the canonical presentation.
    boolean
    equals(Object other)
    Compares canonical presentation bytes by content.
    int
    Returns a content-based hash code.
    Returns a redacted structural description.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • MAXIMUM_BYTES

      public static final int MAXIMUM_BYTES
      Maximum canonical presentation length in bytes.
      See Also:
  • Constructor Details

    • KeyPossessionProofPresentation

      public KeyPossessionProofPresentation(byte[] canonicalBytes)
      Validates and defensively owns the presentation.
      Throws:
      IllegalArgumentException - if the payload is null, empty, or exceeds 2048 bytes
  • Method Details

    • canonicalBytes

      public byte[] canonicalBytes()
      Returns a defensive copy of the canonical presentation.
      Returns:
      canonical presentation bytes
    • equals

      public boolean equals(Object other)
      Compares canonical presentation bytes by content.
      Specified by:
      equals in class Record
    • hashCode

      public int hashCode()
      Returns a content-based hash code.
      Specified by:
      hashCode in class Record
    • toString

      public String toString()
      Returns a redacted structural description.
      Specified by:
      toString in class Record