Skip to content

Instantly share code, notes, and snippets.

@jyap808
Created January 7, 2016 00:50
Show Gist options
  • Save jyap808/2b00596839fc8fa86f80 to your computer and use it in GitHub Desktop.
Save jyap808/2b00596839fc8fa86f80 to your computer and use it in GitHub Desktop.
Blake 256 hash
package main
import (
"encoding/hex"
"fmt"
"github.com/decred/blake256"
)
func main() {
s := "The quick brown fox jumps over the lazy dog"
h := blake256.New()
h.Write([]byte(s))
hash := hex.EncodeToString(h.Sum(nil))
fmt.Println("s:", s)
fmt.Println("h:", hash)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment