Class SignFileResult
Object
SignFileResult
Immutable value object returned by
.
invalid reference
co.ankatech.ankasecure.sdk.AnkaSecureSdk#signFile(java.nio.file.Path, String)
This class bundles the full Compact JWS produced by the Anka Secure platform when signing a file, along with exhaustive metadata about the key operations and any non-fatal warnings.
Compact JWS Structure
A Compact JWS consists of three Base64URL-encoded segments separated by dots:
- Header: JSON object containing signature metadata such
as
alg
(e.g.Falcon-1024
) andkid
(key identifier). - Payload: the detached or embedded file content, depending on your configuration.
- Signature: the digital signature computed over the header and payload, using the negotiated PQC or hybrid algorithm.
Persistence Strategy
The SDK writes the Compact JWS to the
signatureFile
path provided by the caller, encoded as UTF-8. The
resulting file can be retained for later verification via the SDK or fed into
third-party tools.
Metadata
- keyRequested – the
kid
originally supplied by the client. - actualKeyUsed – the effective
kid
after server-side rotation/succession logic. - algorithmUsed – the exact signature algorithm negotiated
(e.g.
SLH-DSA-256
orFalcon-1024
). - warnings – any non-fatal issues returned by the service
(soft usage limits, pending expiry), or
null
if none.
Thread-Safety
Instances are simple data holders; after construction they may be shared across threads safely, provided no setter is invoked.
All getters return non-null
values except
getWarnings(), which may be null
when no warnings
were issued.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the effective key identifier used after any server-side rotation.Returns the signature algorithm negotiated by the service (e.g.Returns the raw Compact JWS exactly as issued by the server.Returns the key identifier originally requested by the client.Returns any non-fatal warnings issued by the service.
-
Constructor Details
-
SignFileResult
public SignFileResult()
-
-
Method Details
-
getJwsToken
Returns the raw Compact JWS exactly as issued by the server.- Returns:
- non-null Compact JWS string
-
getKeyRequested
Returns the key identifier originally requested by the client.- Returns:
- non-null requested kid
-
getActualKeyUsed
Returns the effective key identifier used after any server-side rotation.- Returns:
- non-null actual kid
-
getAlgorithmUsed
Returns the signature algorithm negotiated by the service (e.g. SLH-DSA-256 or Falcon-1024).- Returns:
- non-null algorithm identifier
-
getWarnings
-