create hash from passphrase

This commit is contained in:
ed 2019-12-18 08:58:27 +01:00
commit 617b6cb03f
1 changed files with 20 additions and 0 deletions

20
main.go Normal file
View File

@ -0,0 +1,20 @@
package main
import (
"crypto/md5"
"fmt"
)
func hashMkr(passwd string) []byte {
h := md5.New()
h.Write([]byte(passwd))
return h.Sum(nil)
}
func main() {
var passwd string = "ThisAPassphrase"
fmt.Println(passwd)
hash := hashMkr(passwd)
fmt.Println(hash)
}