blob: 84c7d5d5e1d973080618ae9f7cd7ea73de3e0266 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Author: arnej
package util
import (
"crypto/md5"
"fmt"
"io"
)
func Md5Hex(text string) string {
hasher := md5.New()
io.WriteString(hasher, text)
hash := hasher.Sum(nil)
return fmt.Sprintf("%x", hash)
}
|