Compare commits

...

3 Commits

Author SHA1 Message Date
AI Engineer
5e5758c692 chore(keys): 对齐依赖版本并更新文档(by AI) 2026-06-21 10:20:26 +08:00
AI Engineer
1b91a4af0c chore: align infrastructure to v1.5.x (by AI) 2026-06-11 22:23:29 +08:00
AI Engineer
4d349f472d chore: align infrastructure to v1.5.2 (by AI) 2026-06-11 19:04:39 +08:00
5 changed files with 21 additions and 11 deletions

View File

@ -1,5 +1,14 @@
# Changelog: @go/keys # Changelog: @go/keys
## v1.5.3 (2026-06-21)
- **依赖更新**: 升级依赖 `jsmod``v1.5.3``cast``v1.5.3``rand``v1.5.3``encoding``v1.5.4``shell``v1.5.3``safe``v1.5.2``crypto``v1.5.3``file``v1.5.5``crypto-sm``v1.5.4`
## v1.5.2 (2026-06-11)
- **基础设施对齐**: 全面适配 `encoding` v1.5.3 的 URLBase64 语义化 API。
## v1.5.1 (2026-06-08)
- **版本对齐**: 基础设施全局对齐 v1.5.1。
## v1.0.2 (2026-06-02) ## v1.0.2 (2026-06-02)
### 🛠 Improvements ### 🛠 Improvements

View File

@ -7,6 +7,7 @@
- **CPU**: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz - **CPU**: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
## 单元测试结果 ## 单元测试结果
运行时间: 2026-06-21
运行命令: `go test -v ./lib` 运行命令: `go test -v ./lib`
| 测试用例 | 状态 | 描述 | | 测试用例 | 状态 | 描述 |

18
go.mod
View File

@ -3,21 +3,21 @@ module apigo.cc/go/keys
go 1.25.0 go 1.25.0
require ( require (
apigo.cc/go/crypto v1.5.0 apigo.cc/go/crypto v1.5.3
apigo.cc/go/crypto-sm v1.5.0 apigo.cc/go/crypto-sm v1.5.4
apigo.cc/go/encoding v1.5.0 apigo.cc/go/encoding v1.5.4
apigo.cc/go/file v1.5.0 apigo.cc/go/file v1.5.5
apigo.cc/go/safe v1.5.0 apigo.cc/go/safe v1.5.2
apigo.cc/go/shell v1.5.0 apigo.cc/go/shell v1.5.3
github.com/c-bata/go-prompt v0.2.6 github.com/c-bata/go-prompt v0.2.6
golang.org/x/term v0.43.0 golang.org/x/term v0.43.0
) )
require apigo.cc/go/jsmod v1.5.0 // indirect require apigo.cc/go/jsmod v1.5.3
require ( require (
apigo.cc/go/cast v1.5.0 // indirect apigo.cc/go/cast v1.5.3
apigo.cc/go/rand v1.5.0 // indirect apigo.cc/go/rand v1.5.3
github.com/clipperhouse/uax29/v2 v2.6.0 // indirect github.com/clipperhouse/uax29/v2 v2.6.0 // indirect
github.com/emmansun/gmsm v0.28.0 // indirect github.com/emmansun/gmsm v0.28.0 // indirect
github.com/kr/text v0.2.0 // indirect github.com/kr/text v0.2.0 // indirect

View File

@ -274,7 +274,7 @@ func handlePasswordCmd(keyName string, args []string) {
dec, err := lib.LoadPassword(keyName, target, key, iv, algo) dec, err := lib.LoadPassword(keyName, target, key, iv, algo)
if err != nil || len(dec) == 0 { if err != nil || len(dec) == 0 {
// 尝试作为原始密文解密 // 尝试作为原始密文解密
rawData, err2 := encoding.UnUrlBase64FromString(target) rawData, err2 := encoding.UnURLBase64(target)
if err2 == nil { if err2 == nil {
sym, err3 := ks.NewSymmetric(algo) sym, err3 := ks.NewSymmetric(algo)
if err3 == nil { if err3 == nil {

View File

@ -372,7 +372,7 @@ func executorPassword(in string) {
dec, err := lib.LoadPassword(activeKeyName, target, activeKey, activeIV, algo) dec, err := lib.LoadPassword(activeKeyName, target, activeKey, activeIV, algo)
if err != nil || len(dec) == 0 { if err != nil || len(dec) == 0 {
// Try as raw ciphertext // Try as raw ciphertext
rawData, err2 := encoding.UnUrlBase64FromString(target) rawData, err2 := encoding.UnURLBase64(target)
if err2 == nil { if err2 == nil {
dec2, err3 := decryptEphemeral(activeKey, activeIV, algo, rawData) dec2, err3 := decryptEphemeral(activeKey, activeIV, algo, rawData)
if err3 == nil { if err3 == nil {