1
0

Add gosec static analysis

This commit is contained in:
kolaente
2020-04-13 22:30:09 +02:00
parent fb8ac92abf
commit b8d7c97eb7
8 changed files with 16 additions and 9 deletions

View File

@ -17,14 +17,15 @@
package utils
import (
"crypto/md5"
"crypto/md5" // #nosec
"fmt"
"io"
)
// Md5String generates an md5 hash from a string
func Md5String(in string) string {
// #nosec
h := md5.New()
io.WriteString(h, in)
_, _ = io.WriteString(h, in)
return fmt.Sprintf("%x", h.Sum(nil))
}