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:

  1. Key-pair generation – classical RSA-2048.
  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:
2.1.0
Author:
ANKATech – Security Engineering
  • Method Details

    • main

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