diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2018-12-29 19:33:16 -0500 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2018-12-29 19:33:16 -0500 |
| commit | 1ed8283df70c5c2f597821fd318cbda89d2eb7ea (patch) | |
| tree | 1e22ecc92066308a18b5e8226cebe2b2236acc9d /utils.go | |
| parent | 22e21e02e7d333c9e613456f0c203cd167dba4b1 (diff) | |
| download | id-1ed8283df70c5c2f597821fd318cbda89d2eb7ea.tar.gz | |
Add basic user page
Diffstat (limited to 'utils.go')
| -rw-r--r-- | utils.go | 13 |
1 files changed, 13 insertions, 0 deletions
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 +} |
