Skip to content

Instantly share code, notes, and snippets.

@ryansb
Created July 31, 2013 01:19
Show Gist options
  • Save ryansb/6118547 to your computer and use it in GitHub Desktop.
Save ryansb/6118547 to your computer and use it in GitHub Desktop.
package main
import (
"crypto/sha256"
"encoding/hex"
"fmt"
)
func main() {
hash := sha256.New()
hash.Write([]byte("DATADATADATA"))
fmt.Println(string(hex.EncodeToString(hash.Sum(make([]byte, 1)))))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment