Files
likedream/internal/application/cpdaily/cryptoutil/md5.go
T
2025-11-14 21:48:56 +08:00

13 lines
250 B
Go

package cryptoutil
import (
"crypto/md5"
"encoding/hex"
)
// MD5 对输入字符串进行 MD5 加密,返回 32 位小写十六进制字符串
func MD5(input string) string {
hash := md5.Sum([]byte(input))
return hex.EncodeToString(hash[:])
}