Class ExampleScenario2

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

public final class ExampleScenario2 extends Object
Scenario 2 — RSA-2048 Streaming Sign / Verify.

This walkthrough illustrates a detached-JWS workflow on a pre-provisioned key (the SDK is data-plane-only — it does not create keys):

  1. Key resolution — resolve a pre-provisioned RSA-2048 key from the demo-cli playground.
  2. Streaming sign — the SDK uploads the file in chunks and receives a detached JWS (General JSON) whose payload is null.
  3. Streaming verify — the same detached signature is verified against the binary payload with constant memory.

Rule of thumb:

  • Non-streaming → compact JWS / compact JWE
  • Streaming → detached JWS / detached JWE

All artefacts are written under temp_files/.

Implementation notes (Java 21+):

Thread-safety: the class is stateless and immutable; all variables are confined to the current thread.

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

    • main

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