idkey/README.md

12 lines
382 B
Markdown
Raw Permalink Normal View History

2021-01-21 17:31:12 +08:00
# idkey [![PkgGoDev](https://pkg.go.dev/badge/github.com/xiaoqidun/idkey)](https://pkg.go.dev/github.com/xiaoqidun/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密码
hash := idkey.Encode([]byte("admin"), nil)
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
```