Releases: lamanlu/tools
Releases · lamanlu/tools
v1.1.2
v1.1.0
v1.0.5
v1.0.3
v1.0.2
V1.0.1
一个基于 Cobra 的命令行工具集,用于生成 root/work 密钥并对字符串进行加密。
1. 生成 root key 与 salt(在 rootKey/ 目录)
./tools key-gen --type root
2. 生成工作密钥(在 workKey/ 目录)
./tools key-gen --type work --name work.key
3. 加密字符串(输出 Base64)
cipher=$(./tools encrypt --work-key work.key "hello-world")
echo "$cipher"
4. 解密 Base64(输出明文)
plain=$(./tools decrypt --work-key work.key "$cipher")
echo "$plain"