Class ServerControlOperationOutcome.OneTimeSensitive
java.lang.Object
zeroecho.pki.server.ServerControlOperationOutcome.OneTimeSensitive
- All Implemented Interfaces:
ServerControlOperationOutcome
- Enclosing interface:
ServerControlOperationOutcome
public static final class ServerControlOperationOutcome.OneTimeSensitive
extends Object
implements ServerControlOperationOutcome
Single-consumption capability delivery result, never a PKI operation value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ServerControlOperationOutcome
ServerControlOperationOutcome.Classification, ServerControlOperationOutcome.OneTimeSensitive, ServerControlOperationOutcome.Ordinary -
Constructor Summary
ConstructorsConstructorDescriptionOneTimeSensitive(PkiOperationResult safeResult, byte[] token) Creates a one-time result after its commitment has been durably persisted. -
Method Summary
Modifier and TypeMethodDescriptionReturns the response handling classification.byte[]Consumes the raw token exactly once and clears the retained copy.Returns safe non-secret metadata.
-
Constructor Details
-
OneTimeSensitive
Creates a one-time result after its commitment has been durably persisted.- Parameters:
safeResult- non-secret result metadatatoken- exactly 32 capability-token bytes; defensively copied- Throws:
IllegalArgumentException- if the token length is not 32 bytes
-
-
Method Details
-
classification
Description copied from interface:ServerControlOperationOutcomeReturns the response handling classification.- Specified by:
classificationin interfaceServerControlOperationOutcome- Returns:
- handling classification
-
safeResult
Returns safe non-secret metadata.- Returns:
- replayable result metadata
-
consumeToken
public byte[] consumeToken()Consumes the raw token exactly once and clears the retained copy.- Returns:
- a new array containing the token
- Throws:
IllegalStateException- if the token was already consumed
-