Skip to content

Instantly share code, notes, and snippets.

@slav123
Created March 18, 2015 04:01
Show Gist options
  • Save slav123/4a29d1e0fdae152e1a6c to your computer and use it in GitHub Desktop.
Save slav123/4a29d1e0fdae152e1a6c to your computer and use it in GitHub Desktop.
md5.go
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