Class ReencryptFileResult
Object
ReencryptFileResult
Immutable response model returned by
.
invalid reference
co.ankatech.ankasecure.sdk.AnkaSecureSdk#reencryptFile(java.nio.file.Path, String, String)
This class encapsulates a new Compact JWE after re-encrypting an existing payload with a different key. It provides metadata for both the old decryption key and the new encryption key used by the platform.
Payload handling
The SDK persists the Compact JWE into theoutputFile
specified by the caller, encoded with UTF-8. The string
already contains all five Base64URL segments defined by
RFC 7516:
BASE64URL(ProtectedHeader).
BASE64URL(EncryptedKey).
BASE64URL(IV).
BASE64URL(Ciphertext).
BASE64URL(Tag)
The application can either keep the file intact or
process the string with a third-party JWE library.
Key metadata
- oldKeyRequested: the
kid
originally supplied for decryption. - oldKeyUsed: the effective
kid
used by the server for decryption after rotation/succession logic. - oldKeyAlgorithmUsed: the hybrid algorithm negotiated for decryption.
- newKeyRequested: the
kid
originally supplied for encryption. - newKeyUsed: the effective
kid
used by the server for encryption after rotation/succession logic. - newKeyAlgorithmUsed: the hybrid algorithm negotiated for encryption.
Thread-safety
Instances are immutable data carriers after construction and may be shared across threads safely, provided no mutator is invoked.
All getters return non-null
values except
getWarnings()
, which may be null
if no warnings were
issued.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the raw Compact JWE exactly as emitted by the server.Returns the hybrid algorithm used for encryption.Returns the original key identifier requested for encryption.Returns the effective key identifier used for encryption.Returns the hybrid algorithm used for decryption.Returns the original key identifier requested for decryption.Returns the effective key identifier used for decryption.Returns any non-fatal warnings issued by the service.
-
Constructor Details
-
ReencryptFileResult
public ReencryptFileResult()
-
-
Method Details
-
getJweToken
Returns the raw Compact JWE exactly as emitted by the server.- Returns:
- non-null Compact JWE string
-
getOldKeyRequested
Returns the original key identifier requested for decryption.- Returns:
- non-null old kid
-
getOldKeyUsed
Returns the effective key identifier used for decryption.- Returns:
- non-null old kid
-
getOldKeyAlgorithmUsed
Returns the hybrid algorithm used for decryption.- Returns:
- non-null algorithm identifier
-
getNewKeyRequested
Returns the original key identifier requested for encryption.- Returns:
- non-null new kid
-
getNewKeyUsed
Returns the effective key identifier used for encryption.- Returns:
- non-null new kid
-
getNewKeyAlgorithmUsed
Returns the hybrid algorithm used for encryption.- Returns:
- non-null algorithm identifier
-
getWarnings
-