Created
December 28, 2018 02:36
-
-
Save schweigert/3f82e17b9b2a3e4e1f5b062fd2dc815a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"crypto/sha256" | |
"encoding/hex" | |
) | |
func main() { | |
s := "123123" | |
h := sha256.New() | |
h.Write([]byte(s)) | |
sha256_hash := hex.EncodeToString(h.Sum(nil)) | |
fmt.Println(s, sha256_hash) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment