gobyexample/sha/sha.go
2024-05-03 00:05:14 +05:30

14 lines
180 B
Go

package sha
import (
"crypto/sha256"
"fmt"
)
func Sha() {
h := sha256.New()
h.Write([]byte("hello world!"))
fmt.Printf("SHA256 hash of 'hello world!': %x\n", h.Sum(nil))
}