optimized_go_tools/am_docs/hashsalt.md
2024-07-08 11:14:19 +08:00

12 lines
418 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Hash Salt 加密件
用于对密码等敏感信息进行加密入库。
## 使用方法
```go
// 加密信息
var originData = "123456" // 明文信息
var encryptedMessage = am_hashsalt.HashData(originData) // 加密操作,获得加密后的字串
// 匹配信息
var result = am_hashsalt.CompareData(encryptedData, originData) // 比对两者是否一致返回bool值true为一致false为不一致
```