feat: add FastAPI manager API compatibility baseline

This commit is contained in:
Tyke Chen
2026-07-20 17:00:13 +08:00
parent 7c58fa37b2
commit 804ddb51f2
140 changed files with 47169 additions and 1 deletions
@@ -0,0 +1,18 @@
import xiaozhi.common.utils.SM2Utils;
/** Tiny subprocess boundary used by the Python/Java SM2 interoperability tests. */
public final class Sm2InteropCli {
private Sm2InteropCli() {
}
public static void main(String[] args) {
if (args.length != 3) {
throw new IllegalArgumentException("usage: encrypt <public-key> <plaintext> | decrypt <private-key> <ciphertext>");
}
switch (args[0]) {
case "encrypt" -> System.out.print(SM2Utils.encrypt(args[1], args[2]));
case "decrypt" -> System.out.print(SM2Utils.decrypt(args[1], args[2]));
default -> throw new IllegalArgumentException("unknown operation: " + args[0]);
}
}
}