I can not figure out how to encrypt Go. I do everything as in the example:
h := sha1.New() io.WriteString(h, "123456") fmt.Println(h.Sum(nil))
Everything is OK, at the output I see the promised
byte array. But when trying to convert it to a string
var result = string(h.Sum(nil))
It turns out some kind of abracadabra, I just can not understand what's the matter ...