Class ExampleScenario6

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

public final class ExampleScenario6 extends Object
Scenario 6 — ML-DSA-87 Bulk Helpers (Compact JWS).

This scenario signs and verifies a document with non-streaming helpers that operate on RFC 7515 Compact JWS tokens:

  1. Resolve a pre-provisioned ML-DSA-87 key from the demo-cli playground (the SDK is data-plane-only — it does not create keys).
  2. Create a Compact JWS on disk via AuthenticatedSdk.signFileCompact(String, Path, Path).
  3. Verify it via AuthenticatedSdk.verifySignature(Path).
  4. Print server metadata and validate integrity.

Implementation notes (Java 21+):

  • Filesystem interactions rely on 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:
3.0.0
Author:
ANKATech Solutions Inc.
See Also:
  • Method Details

    • main

      public static void main(String[] args)
      Runs the ML-DSA-87 compact JWS sign/verify 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)