mirror of
https://github.com/KaySar12/NextZen-UserService.git
synced 2025-03-19 17:15:36 +07:00
22 lines
429 B
Go
22 lines
429 B
Go
|
/*
|
||
|
* @Author: LinkLeong link@icewhale.com
|
||
|
* @Date: 2022-06-14 14:33:25
|
||
|
* @LastEditors: LinkLeong
|
||
|
* @LastEditTime: 2022-06-14 14:33:49
|
||
|
* @Description:
|
||
|
* @Website: https://www.casaos.io
|
||
|
* Copyright (c) 2022 by icewhale, All Rights Reserved.
|
||
|
*/
|
||
|
package encryption
|
||
|
|
||
|
import (
|
||
|
"crypto/md5"
|
||
|
"encoding/hex"
|
||
|
)
|
||
|
|
||
|
func GetMD5ByStr(str string) string {
|
||
|
h := md5.New()
|
||
|
h.Write([]byte(str))
|
||
|
return hex.EncodeToString(h.Sum(nil))
|
||
|
}
|