mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 18:21:12 +02:00
multi: replace usage of fastsha256 with crypto/sha256
This commit removes all instances of the fastsha256 library and replaces it with the sha256 library in the standard library. This change should see a number of performance improvements as the standard library has highly optimized assembly instructions with use vectorized instructions as the platform supports.
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"golang.org/x/crypto/hkdf"
|
||||
|
||||
"github.com/aead/chacha20"
|
||||
"github.com/btcsuite/fastsha256"
|
||||
"github.com/roasbeef/btcd/btcec"
|
||||
)
|
||||
|
||||
@@ -53,7 +52,7 @@ func ecdh(pub *btcec.PublicKey, priv *btcec.PrivateKey) []byte {
|
||||
s.X = x
|
||||
s.Y = y
|
||||
|
||||
h := fastsha256.Sum256(s.SerializeCompressed())
|
||||
h := sha256.Sum256(s.SerializeCompressed())
|
||||
return h[:]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user