aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/crypto.go
diff options
context:
space:
mode:
authorDave McGregor <dave.s.mcgregor@gmail.com>2019-01-04 06:15:26 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-01-04 15:26:07 +0800
commit33d233d3e18359123993d3f54987441290faf212 (patch)
tree6c203ca106f29eb3525df9bdd4737b1ecb48b77d /crypto/crypto.go
parent49975264a8d37aa9af1a2b71015059245c0c2e0b (diff)
downloadgo-tangerine-33d233d3e18359123993d3f54987441290faf212.tar
go-tangerine-33d233d3e18359123993d3f54987441290faf212.tar.gz
go-tangerine-33d233d3e18359123993d3f54987441290faf212.tar.bz2
go-tangerine-33d233d3e18359123993d3f54987441290faf212.tar.lz
go-tangerine-33d233d3e18359123993d3f54987441290faf212.tar.xz
go-tangerine-33d233d3e18359123993d3f54987441290faf212.tar.zst
go-tangerine-33d233d3e18359123993d3f54987441290faf212.zip
vendor, crypto, swarm: switch over to upstream sha3 package
Diffstat (limited to 'crypto/crypto.go')
-rw-r--r--crypto/crypto.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/crypto.go b/crypto/crypto.go
index 9b3e76d40..4567fafc7 100644
--- a/crypto/crypto.go
+++ b/crypto/crypto.go
@@ -30,8 +30,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
- "github.com/ethereum/go-ethereum/crypto/sha3"
"github.com/ethereum/go-ethereum/rlp"
+ "golang.org/x/crypto/sha3"
)
var (
@@ -43,7 +43,7 @@ var errInvalidPubkey = errors.New("invalid secp256k1 public key")
// Keccak256 calculates and returns the Keccak256 hash of the input data.
func Keccak256(data ...[]byte) []byte {
- d := sha3.NewKeccak256()
+ d := sha3.NewLegacyKeccak256()
for _, b := range data {
d.Write(b)
}
@@ -53,7 +53,7 @@ func Keccak256(data ...[]byte) []byte {
// Keccak256Hash calculates and returns the Keccak256 hash of the input data,
// converting it to an internal Hash data structure.
func Keccak256Hash(data ...[]byte) (h common.Hash) {
- d := sha3.NewKeccak256()
+ d := sha3.NewLegacyKeccak256()
for _, b := range data {
d.Write(b)
}
@@ -63,7 +63,7 @@ func Keccak256Hash(data ...[]byte) (h common.Hash) {
// Keccak512 calculates and returns the Keccak512 hash of the input data.
func Keccak512(data ...[]byte) []byte {
- d := sha3.NewKeccak512()
+ d := sha3.NewLegacyKeccak512()
for _, b := range data {
d.Write(b)
}