Record Class SignatureWorkflow.SignRequest

java.lang.Object
java.lang.Record
zeroecho.pki.spi.crypto.SignatureWorkflow.SignRequest
Record Components:
submissionId - stable caller-assigned submission identifier
namespace - provider/store namespace
semanticFingerprint - versioned request fingerprint excluding fence
fencingToken - current positive fencing token
accessContext - audit/governance context (never null)
keyRef - opaque reference to the private key (never null)
algorithmId - requested signature algorithm id (never blank)
content - immutable repeatable content
preferredSignatureEncoding - preferred signature encoding (optional)
deadline - optional absolute deadline
Enclosing interface:
SignatureWorkflow

public static record SignatureWorkflow.SignRequest(PkiId submissionId, String namespace, String semanticFingerprint, long fencingToken, AccessContext accessContext, KeyRef keyRef, String algorithmId, RepeatableContent content, Optional<Encoding> preferredSignatureEncoding, Optional<Instant> deadline, CancellationSignal cancellation) extends Record
Signing request.

Note: this record performs basic structural validation and may throw IllegalArgumentException at construction time. Callers building requests for external transports are expected to catch such exceptions and convert them to an appropriate error state before invoking SignatureWorkflow.submitSign(SignRequest, CallControl).

  • Constructor Details

  • Method Details

    • create

      public static SignatureWorkflow.SignRequest create(PkiId submissionId, String namespace, long fencingToken, AccessContext accessContext, KeyRef keyRef, String algorithmId, RepeatableContent content, Optional<Encoding> preferredSignatureEncoding, Optional<Instant> deadline)
      Creates a request with its canonical versioned fingerprint.
    • fingerprint

      public static String fingerprint(String namespace, AccessContext accessContext, KeyRef keyRef, String algorithmId, RepeatableContent content, Optional<Encoding> preferredSignatureEncoding, Optional<Instant> deadline)
      Computes the canonical signfp:v1 semantic fingerprint in O(payload) time and O(payload) temporary memory from the defensive payload copy, with constant-size digest state.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • submissionId

      public PkiId submissionId()
      Returns the value of the submissionId record component.
      Returns:
      the value of the submissionId record component
    • namespace

      public String namespace()
      Returns the value of the namespace record component.
      Returns:
      the value of the namespace record component
    • semanticFingerprint

      public String semanticFingerprint()
      Returns the value of the semanticFingerprint record component.
      Returns:
      the value of the semanticFingerprint record component
    • fencingToken

      public long fencingToken()
      Returns the value of the fencingToken record component.
      Returns:
      the value of the fencingToken record component
    • accessContext

      public AccessContext accessContext()
      Returns the value of the accessContext record component.
      Returns:
      the value of the accessContext record component
    • keyRef

      public KeyRef keyRef()
      Returns the value of the keyRef record component.
      Returns:
      the value of the keyRef record component
    • algorithmId

      public String algorithmId()
      Returns the value of the algorithmId record component.
      Returns:
      the value of the algorithmId record component
    • content

      public RepeatableContent content()
      Returns the value of the content record component.
      Returns:
      the value of the content record component
    • preferredSignatureEncoding

      public Optional<Encoding> preferredSignatureEncoding()
      Returns the value of the preferredSignatureEncoding record component.
      Returns:
      the value of the preferredSignatureEncoding record component
    • deadline

      public Optional<Instant> deadline()
      Returns the value of the deadline record component.
      Returns:
      the value of the deadline record component
    • cancellation

      public CancellationSignal cancellation()
      Returns the value of the cancellation record component.
      Returns:
      the value of the cancellation record component