This commit is contained in:
Jae Kwon
2014-07-09 14:27:32 -07:00
parent ed19b7e0ae
commit 2d39e463a5
4 changed files with 39 additions and 17 deletions
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"crypto/sha256"
)
// DoubleSha256 calculates sha256(sha256(b)) and returns the resulting bytes.
func DoubleSha256(b []byte) []byte {
// doubleSha256 calculates sha256(sha256(b)) and returns the resulting bytes.
func doubleSha256(b []byte) []byte {
hasher := sha256.New()
hasher.Write(b)
sum := hasher.Sum(nil)