package main
import (
"crypto/sha256"
"fmt"
)
func main() {
str := "nilpointer"
data := []byte(str)
hash := sha256.Sum256(data)
fmt.Printf("%x", hash[:])
}
Output
6e0b3b41da495276c95bd32985b6dd5b870d50b965d6b4df50f810fb6eb1def8