Sum256 in Go

Posted by GoDoc
Public (Editable by Users)

Sum256 returns the SHA256 checksum of the data.

Go
Edit
package main

import (
	"crypto/sha256"
	"fmt"
)

func main() {
	sum := sha256.Sum256([]byte("hello world\n"))
	fmt.Printf("%x", sum)
}