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 the RFC 7516 Compact JWE format:
- Generate an ML-KEM-512 key.
- Export the key’s metadata.
- Encrypt a file via
AnkaSecureSdk.encryptFile(String, Path, Path)
(compact token written to disk). - Decrypt via
AnkaSecureSdk.decryptFile(Path, Path)
. - Print rich metadata for each call.
- Validate round-trip integrity.
Implementation notes (Java 21+):
- All filesystem interactions use the
Path
API. - UTF-8 is explicitly specified for deterministic encoding.
- Directory creation delegates to
ExampleUtil.ensureTempDir(Path)
.
Thread-safety: this class is stateless and immutable.
- Since:
- 2.1.0
- Author:
- ANKATech – Security Engineering
-
Method Summary
-
Method Details
-
main
-