idkey/README.md

12 lines
263 B
Markdown
Raw Normal View History

2020-01-06 14:29:26 +08:00
# idkey
2020-01-06 14:34:00 +08:00
Golang Argon2id 密码hash和验证
2020-01-06 14:29:26 +08:00
# 安装方法
go get -u github.com/xiaoqidun/idkey
# 使用方法
```go
// 生成argon2id hash密码
2020-01-07 10:31:00 +08:00
hash := idkey.Encode([]byte("admin"))
2020-01-06 14:29:26 +08:00
// 进行argon2id hash验证
2020-01-07 10:31:00 +08:00
verify := idkey.Verify([]byte("admin"), hash)
2020-01-06 14:29:26 +08:00
```