From fdb279f4827d062f665aa5e29e24ee62bf9d712b Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Sat, 4 Jan 2014 22:23:01 -0600 Subject: [PATCH] Use fastsha256 in Hash160. Rather than using the stdlib sha256, use the Conformal fastsha256 package for faster hashing. --- hash160.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hash160.go b/hash160.go index 62d42b5..a65956f 100644 --- a/hash160.go +++ b/hash160.go @@ -6,7 +6,7 @@ package btcutil import ( "code.google.com/p/go.crypto/ripemd160" - "crypto/sha256" + "github.com/conformal/fastsha256" "hash" ) @@ -18,5 +18,5 @@ func calcHash(buf []byte, hasher hash.Hash) []byte { // Hash160 calculates the hash ripemd160(sha256(b)). func Hash160(buf []byte) []byte { - return calcHash(calcHash(buf, sha256.New()), ripemd160.New()) + return calcHash(calcHash(buf, fastsha256.New()), ripemd160.New()) }