Class ExampleScenario3

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

public final class ExampleScenario3 extends Object
Scenario 3 — AES-256 Streaming Encrypt / Decrypt.

This scenario demonstrates a symmetric workflow via the streaming APIs. In streaming mode the service returns a detached JWE (General JSON): the header portion is delivered separately from the raw ciphertext, keeping memory usage constant.

  1. Resolve a pre-provisioned AES-GCM-256 key from the demo-cli playground (the SDK is data-plane-only — it does not create keys).
  2. Stream-encrypt a plaintext file (detached JWE).
  3. Stream-decrypt the ciphertext.
  4. Validate that the plaintext round-trips.

All artefacts are written under temp_files/.

Implementation notes (Java 21+):

Thread-safety: this class is stateless and immutable.

Since:
3.0.0
Author:
ANKATech Solutions Inc.
See Also:
  • Method Details

    • main

      public static void main(String[] args)
      Runs the AES-256 streaming 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)