1 Star 0 Fork 0

golang-package / dongle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
sm3.go 258 Bytes
一键复制 编辑 原始数据 按行查看 历史
gouguoyin 提交于 2022-12-08 16:32 . h->hasher
package dongle
import (
"github.com/tjfoc/gmsm/sm3"
)
// BySm3 encrypts by sm3.
// 通过 sm3 加密
func (e encrypter) BySm3() encrypter {
if len(e.src) == 0 {
return e
}
hasher := sm3.New()
hasher.Write(e.src)
e.dst = hasher.Sum(nil)
return e
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/golang-package/dongle.git
git@gitee.com:golang-package/dongle.git
golang-package
dongle
dongle
v0.2.2

搜索帮助

344bd9b3 5694891 D2dac590 5694891