- refactored User service from IceWhaleTech/CasaOS as first modularized service
This commit is contained in:
Tiger Wang (王豫)
2022-08-04 19:14:53 -04:00
committed by GitHub
parent a71dd10757
commit e2b617e510
23 changed files with 1870 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
/*
* @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))
}