Ai
1 Star 1 Fork 1

up-zero/gotool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
md5_test.go 702 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhaopan 提交于 2023-08-07 10:22 +08:00 . fix md5 新增加盐
package gotool
import (
"testing"
)
func TestMd5(t *testing.T) {
t.Log(Md5("123456")) // e10adc3949ba59abbe56e057f20f883e
t.Log(Md5("1234", "5", "6")) // e10adc3949ba59abbe56e057f20f883e
t.Log(Md5([]byte("123456"))) // e10adc3949ba59abbe56e057f20f883e
t.Log(Md5([]byte("1234"), "5", "6")) // e10adc3949ba59abbe56e057f20f883e
t.Log(Md5("e10adc3949ba59abbe56e057f20f883e")) // 14e1b600b1fd579f47433b88e8d85291
}
func TestMd5Iterations(t *testing.T) {
t.Log(Md5Iterations("123456", 2)) // 14e1b600b1fd579f47433b88e8d85291
}
func TestMd5File(t *testing.T) {
t.Log(Md5File("LICENSE")) // 79b08c4010a4346486fcc7eb63d7edb1
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/up-zero/gotool.git
git@gitee.com:up-zero/gotool.git
up-zero
gotool
gotool
main

搜索帮助