Compare commits

...

2 Commits
main ... v1.5.2

Author SHA1 Message Date
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
4 changed files with 17 additions and 11 deletions

View File

@ -1,5 +1,11 @@
# Changelog: @go/keys # Changelog: @go/keys
## 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

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.2
apigo.cc/go/crypto-sm v1.5.0 apigo.cc/go/crypto-sm v1.5.3
apigo.cc/go/encoding v1.5.0 apigo.cc/go/encoding v1.5.3
apigo.cc/go/file v1.5.0 apigo.cc/go/file v1.5.4
apigo.cc/go/safe v1.5.0 apigo.cc/go/safe v1.5.1
apigo.cc/go/shell v1.5.0 apigo.cc/go/shell v1.5.2
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.2
require ( require (
apigo.cc/go/cast v1.5.0 // indirect apigo.cc/go/cast v1.5.2
apigo.cc/go/rand v1.5.0 // indirect apigo.cc/go/rand v1.5.2
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 {