1 Star 1 Fork 1

xiaoyutab / xgotool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
secret.go 243 Bytes
一键复制 编辑 原始数据 按行查看 历史
xiaoyutab 提交于 2023-11-16 15:20 . 添加谷歌密钥生成规则
package xgoogauth
import (
"bytes"
"encoding/binary"
"strings"
)
// 生成秘钥
func Secret() string {
var buf bytes.Buffer
binary.Write(&buf, binary.BigEndian, un())
return strings.ToUpper(base32encode(hmacSha1(buf.Bytes(), nil)))
}
Go
1
https://gitee.com/xiaoyutab/xgotool.git
git@gitee.com:xiaoyutab/xgotool.git
xiaoyutab
xgotool
xgotool
v0.3.11

搜索帮助

53164aa7 5694891 3bd8fe86 5694891