Class ExampleScenario7
java.lang.Object
co.ankatech.ankasecure.sdk.examples.ExampleScenario7
Scenario 7 — AES-256 Compact JWE Helpers.
This scenario showcases the SDK's non-streaming helpers for symmetric Compact JWE operations:
- Resolve a pre-provisioned
AES-GCM-256key from the demo-cli playground (the SDK is data-plane-only — it does not create keys). - Encrypt a plaintext file (helper stores a Compact JWE).
- Decrypt the ciphertext (helper resolves the key from the JWE header).
- Print metadata and validate integrity.
Implementation notes (Java 21+):
- All filesystem interactions use the
PathAPI. - UTF-8 is enforced explicitly for deterministic encoding.
- Temporary artefacts reside under temp_files/.
Thread-safety: this class is stateless and immutable.
- Since:
- 3.0.0
- Author:
- ANKATech Solutions Inc.
- See Also:
-
Method Summary
-
Method Details
-
main
Runs the AES-256 compact JWE encrypt/decrypt scenario.Loads CLI properties, authenticates against ANKASecure©, and delegates to the scenario logic. On any unrecoverable error the JVM terminates via
ExampleUtil.fatal(String, Throwable).- Parameters:
args- command-line arguments (ignored)
-