Programming Code Center(PCC)
[GO]

(PCC)::[How-SHA1-Hashes-used-to-compute-short-identities-for-binary-or-text-blobs-in-go-language]::[go]

File Name : sha1-hashes.go

package main

import (
    "crypto/sha1"
    "fmt"
)

func main() {
    s := "sha1 this string"

    h := sha1.New()

    h.Write([]byte(s))

    bs := h.Sum(nil)

    fmt.Println(s)
    fmt.Printf("%x\n", bs)
}

Output :

sha1-hashes.jpg