Package zeroecho.pki.spi.crypto
Record Class SignatureWorkflow.SignRequest
java.lang.Object
java.lang.Record
zeroecho.pki.spi.crypto.SignatureWorkflow.SignRequest
- Record Components:
submissionId- stable caller-assigned submission identifiernamespace- provider/store namespacesemanticFingerprint- versioned request fingerprint excluding fencefencingToken- current positive fencing tokenaccessContext- audit/governance context (nevernull)keyRef- opaque reference to the private key (nevernull)algorithmId- requested signature algorithm id (never blank)content- immutable repeatable contentpreferredSignatureEncoding- 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 Summary
ConstructorsConstructorDescriptionSignRequest(PkiId submissionId, String namespace, String semanticFingerprint, long fencingToken, AccessContext accessContext, KeyRef keyRef, String algorithmId, RepeatableContent content, Optional<Encoding> preferredSignatureEncoding, Optional<Instant> deadline, CancellationSignal cancellation) Creates an instance of aSignRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessContextrecord component.Returns the value of thealgorithmIdrecord component.Returns the value of thecancellationrecord component.content()Returns the value of thecontentrecord component.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.deadline()Returns the value of thedeadlinerecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefencingTokenrecord component.static Stringfingerprint(String namespace, AccessContext accessContext, KeyRef keyRef, String algorithmId, RepeatableContent content, Optional<Encoding> preferredSignatureEncoding, Optional<Instant> deadline) Computes the canonicalsignfp:v1semantic fingerprint in O(payload) time and O(payload) temporary memory from the defensive payload copy, with constant-size digest state.final inthashCode()Returns a hash code value for this object.keyRef()Returns the value of thekeyRefrecord component.Returns the value of thenamespacerecord component.Returns the value of thepreferredSignatureEncodingrecord component.Returns the value of thesemanticFingerprintrecord component.Returns the value of thesubmissionIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SignRequest
public 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) Creates an instance of aSignRequestrecord class.- Parameters:
submissionId- the value for thesubmissionIdrecord componentnamespace- the value for thenamespacerecord componentsemanticFingerprint- the value for thesemanticFingerprintrecord componentfencingToken- the value for thefencingTokenrecord componentaccessContext- the value for theaccessContextrecord componentkeyRef- the value for thekeyRefrecord componentalgorithmId- the value for thealgorithmIdrecord componentcontent- the value for thecontentrecord componentpreferredSignatureEncoding- the value for thepreferredSignatureEncodingrecord componentdeadline- the value for thedeadlinerecord componentcancellation- the value for thecancellationrecord component
-
-
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 canonicalsignfp:v1semantic fingerprint in O(payload) time and O(payload) temporary memory from the defensive payload copy, with constant-size digest state. -
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
submissionId
Returns the value of thesubmissionIdrecord component.- Returns:
- the value of the
submissionIdrecord component
-
namespace
Returns the value of thenamespacerecord component.- Returns:
- the value of the
namespacerecord component
-
semanticFingerprint
Returns the value of thesemanticFingerprintrecord component.- Returns:
- the value of the
semanticFingerprintrecord component
-
fencingToken
public long fencingToken()Returns the value of thefencingTokenrecord component.- Returns:
- the value of the
fencingTokenrecord component
-
accessContext
Returns the value of theaccessContextrecord component.- Returns:
- the value of the
accessContextrecord component
-
keyRef
Returns the value of thekeyRefrecord component.- Returns:
- the value of the
keyRefrecord component
-
algorithmId
Returns the value of thealgorithmIdrecord component.- Returns:
- the value of the
algorithmIdrecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
preferredSignatureEncoding
Returns the value of thepreferredSignatureEncodingrecord component.- Returns:
- the value of the
preferredSignatureEncodingrecord component
-
deadline
Returns the value of thedeadlinerecord component.- Returns:
- the value of the
deadlinerecord component
-
cancellation
Returns the value of thecancellationrecord component.- Returns:
- the value of the
cancellationrecord component
-