use fastsha256
This commit is contained in:
parent
dd41f7e91a
commit
6ad853019a
1 changed files with 2 additions and 2 deletions
|
@ -6,9 +6,9 @@ package btcwire
|
|||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"crypto/sha256"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"github.com/conformal/fastsha256"
|
||||
"io"
|
||||
"math"
|
||||
)
|
||||
|
@ -414,7 +414,7 @@ func RandomUint64() (uint64, error) {
|
|||
|
||||
// DoubleSha256 calculates sha256(sha256(b)) and returns the resulting bytes.
|
||||
func DoubleSha256(b []byte) []byte {
|
||||
hasher := sha256.New()
|
||||
hasher := fastsha256.New()
|
||||
hasher.Write(b)
|
||||
sum := hasher.Sum(nil)
|
||||
hasher.Reset()
|
||||
|
|
Loading…
Add table
Reference in a new issue