examples

command
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

json_decrypt.go — temari Go 包完整示例。

演示 **调用方负责网络** 的新模型:

  1. 调用方用 net/http 从 40020 key server 拉取 JSON 响应体
  2. temari.FromJSON(json) 解析为模板(库不做任何网络请求)
  3. 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]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL