go 1.22 阿里云短信使用的sdk出错
1. 运行环境
go 1.12, windows10/amd64
`github.com/KenmyZhang/aliyun-communicate v0.0.0-20180308134849-7997edc57454
2. 问题描述?
panic: encoding alphabet includes duplicate symbols
goroutine 1 [running]:
encoding/base32.NewEncoding(…)
D:/Go/src/encoding/base32/base32.go:79
github.com/KenmyZhang/aliyun-communicate/sms-lib.init()
D:/goproj/pkg/mod/github.com/!kenmy!zhang/communicate@v0.0.0-20180308134849-7997edc57454"">aliyun-communicate@v0.0.0-20180308134849-7997edc57454/sms-lib/sms-lib.go:45 +0xf4
exit status 2
简单排查了下,因为go 1.22版本中 base64.NewEncoding 函数对入参增加了新的验证:不可重复字符,参考:encoding: require unique alphabet for base32 and base64
大佬知道怎么解决这个问题吗
去吧签名的8给改成6就行了
base64Table 值改为 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/
所以请问一下,最后怎么解决的呢?