Sum in Go

Posted by GoDoc
Public (Editable by Users)

Sum returns the SHA-1 checksum of the data.

Go
Edit
package main

import (
	"crypto/sha1"
	"fmt"
)

func main() {
	data := []byte("This page intentionally left blank.")
	fmt.Printf("% x", sha1.Sum(data))
}