Refactor to move common libraries out of project

This commit is contained in:
Jae Kwon
2015-10-22 17:39:06 -07:00
parent 7c12c5aee3
commit c4ed55d801
277 changed files with 406 additions and 11304 deletions

View File

@ -1,15 +0,0 @@
package p2p
import (
"crypto/sha256"
)
// 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)
hasher.Reset()
hasher.Write(sum)
return hasher.Sum(nil)
}