summaryrefslogtreecommitdiff
path: root/internal/mapr/funcs/md5sum.go
blob: e3cc7e60c3f8d107ebfec1053a5fb37f19ff82b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
package funcs

import (
	"crypto/md5"
	"encoding/hex"
)

// Md5Sum returns the hex encoded MD5 checksum of a given input string.
func Md5Sum(text string) string {
	hash := md5.Sum([]byte(text))
	return hex.EncodeToString(hash[:])
}