Class ExampleScenario7

java.lang.Object
co.ankatech.ankasecure.sdk.examples.ExampleScenario7

public final class ExampleScenario7 extends Object

Scenario 7 – AES-256 Compact JWE Helpers

This scenario showcases the SDK’s non-streaming helpers for symmetric Compact JWE operations:

  1. Generate an AES-256 key (kty="oct").
  2. Encrypt a plaintext file (helper stores a Compact JWE).
  3. Decrypt the ciphertext (helper resolves the key from the JWE header).
  4. Print metadata and validate integrity.

Implementation notes (Java 21+):

  • All filesystem interactions use the Path API.
  • UTF-8 is enforced explicitly for deterministic encoding.
  • Temporary artefacts reside under temp_files/.

Thread-safety: this class is stateless and immutable.

Since:
2.1.0
Author:
ANKATech – Security Engineering
  • Method Details

    • main

      public static void main(String[] args)
      Entry-point.