Documentation
¶
Overview ¶
json_decrypt.go — temari Go 包完整示例。
演示 **调用方负责网络** 的新模型:
- 调用方用 net/http 从 40020 key server 拉取 JSON 响应体
- temari.FromJSON(json) 解析为模板(库不做任何网络请求)
- Decrypt / DecryptPar 解密
默认自动拉起仓库 mock 40020,对 10 条测试轨做 FromJSON 全流程验证, 并逐字节对比已知明文。也可用 --json 指定本地 JSON 模板文件(离线)。
运行(需已 `cargo build --release` 构建 libtemari.so):
cd <temari>/bindings/go go run ./examples/json_decrypt.go [--server 127.0.0.1:40020] [--no-mock]
Click to show internal directories.
Click to hide internal directories.