Files
exchange_go/pkg/cryptohelper/md5helper/md5helper.go
2025-02-06 11:14:33 +08:00

18 lines
252 B
Go

package md5helper
import (
"crypto/md5"
"encoding/hex"
)
// MD5 md5加密
func MD5(input string) string {
cc := md5.Sum([]byte(input))
return hex.EncodeToString(cc[:])
}
// MD52 md52次
func MD52(input string) string {
return MD5(MD5(input))
}