Table of Contents

crypto/sha256

What is it?

`crypto/sha256` provides the SHA-256 cryptographic hash function.

What is it used for?

Example (Sum256)

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

Notes

Hard words (English)