Class ExampleScenario5
java.lang.Object
co.ankatech.ankasecure.sdk.examples.ExampleScenario5
Scenario 5 — ML-KEM-512 Bulk Helpers (Compact JWE).
This scenario demonstrates the non-streaming helper methods that work with RFC 7516 Compact JWE tokens:
- Resolve a pre-provisioned
ML-KEM-512key from the demo-cli playground (the SDK is data-plane-only — it does not create keys). - Encrypt a file via
AuthenticatedSdk.encryptFile(String, Path, Path)(compact token written to disk). - Decrypt via
AuthenticatedSdk.decryptFile(Path, Path). - Print rich metadata for both operations.
- Validate round-trip integrity.
Implementation notes (Java 21+):
- All filesystem interactions use the
PathAPI. - UTF-8 is enforced explicitly for deterministic encoding.
- Temporary artefacts are written 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 ML-KEM-512 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)
-