create hash from passphrase
This commit is contained in:
commit
617b6cb03f
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue