From 1ed8283df70c5c2f597821fd318cbda89d2eb7ea Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Sat, 29 Dec 2018 19:33:16 -0500 Subject: Add basic user page --- utils.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 utils.go (limited to 'utils.go') diff --git a/utils.go b/utils.go new file mode 100644 index 0000000..c123565 --- /dev/null +++ b/utils.go @@ -0,0 +1,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 +} -- cgit v1.2.3-70-g09d2