Skip to content

Instantly share code, notes, and snippets.

@imom39a
Created April 1, 2020 13:07
Show Gist options
  • Save imom39a/90176a5e6d815f4fa64f018d8390f01d to your computer and use it in GitHub Desktop.
Save imom39a/90176a5e6d815f4fa64f018d8390f01d to your computer and use it in GitHub Desktop.
import (
"crypto/md5"
"encoding/hex"
)
func GetMD5Hash(text string) string {
hasher := md5.New()
hasher.Write([]byte(text))
return hex.EncodeToString(hasher.Sum(nil))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment