new
This commit is contained in:
20
service/framework/utils/password.go
Normal file
20
service/framework/utils/password.go
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
#*****************************************************************************
|
||||
# @author MakerYang
|
||||
# @site mir2.makeryang.com
|
||||
#*****************************************************************************
|
||||
*/
|
||||
|
||||
package Utils
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
)
|
||||
|
||||
func EncryptMD5(input string) string {
|
||||
hash := md5.New()
|
||||
hash.Write([]byte(input))
|
||||
hashBytes := hash.Sum(nil)
|
||||
return hex.EncodeToString(hashBytes)
|
||||
}
|
||||
Reference in New Issue
Block a user