aboutsummaryrefslogtreecommitdiffstats
path: root/utils.go
blob: c1235655e60637aed8603f3a3ba30369e6120ab0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package main

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

func md5hex(b []byte) []byte {
	hash := md5.Sum(b)
	dst := make([]byte, hex.EncodedLen(md5.Size))
	hex.Encode(dst, hash[:])
	return dst
}