1
0
Fork 0
forked from forgejo/forgejo
This commit is contained in:
Unknwon 2015-11-24 18:49:34 -05:00
parent 56c66ee486
commit 7f9598141b
8 changed files with 10 additions and 10 deletions

View file

@ -31,8 +31,8 @@ import (
var Sanitizer = bluemonday.UGCPolicy().AllowAttrs("class").Matching(regexp.MustCompile(`[\p{L}\p{N}\s\-_',:\[\]!\./\\\(\)&]*`)).OnElements("code")
// Encode string to md5 hex value.
func EncodeMd5(str string) string {
// EncodeMD5 encodes string to md5 hex value.
func EncodeMD5(str string) string {
m := md5.New()
m.Write([]byte(str))
return hex.EncodeToString(m.Sum(nil))