aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/api/act.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 /swarm/api/act.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 'swarm/api/act.go')
-rw-r--r--swarm/api/act.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/swarm/api/act.go b/swarm/api/act.go
index e54369f9a..9566720b0 100644
--- a/swarm/api/act.go
+++ b/swarm/api/act.go
@@ -15,11 +15,11 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/ecies"
- "github.com/ethereum/go-ethereum/crypto/sha3"
"github.com/ethereum/go-ethereum/swarm/log"
"github.com/ethereum/go-ethereum/swarm/sctx"
"github.com/ethereum/go-ethereum/swarm/storage"
"golang.org/x/crypto/scrypt"
+ "golang.org/x/crypto/sha3"
cli "gopkg.in/urfave/cli.v1"
)
@@ -336,7 +336,7 @@ func (a *API) doDecrypt(ctx context.Context, credentials string, pk *ecdsa.Priva
}
func (a *API) getACTDecryptionKey(ctx context.Context, actManifestAddress storage.Address, sessionKey []byte) (found bool, ciphertext, decryptionKey []byte, err error) {
- hasher := sha3.NewKeccak256()
+ hasher := sha3.NewLegacyKeccak256()
hasher.Write(append(sessionKey, 0))
lookupKey := hasher.Sum(nil)
hasher.Reset()
@@ -462,7 +462,7 @@ func DoACT(ctx *cli.Context, privateKey *ecdsa.PrivateKey, salt []byte, grantees
return nil, nil, nil, err
}
- hasher := sha3.NewKeccak256()
+ hasher := sha3.NewLegacyKeccak256()
hasher.Write(append(sessionKey, 0))
lookupKey := hasher.Sum(nil)
@@ -484,7 +484,7 @@ func DoACT(ctx *cli.Context, privateKey *ecdsa.PrivateKey, salt []byte, grantees
if err != nil {
return nil, nil, nil, err
}
- hasher := sha3.NewKeccak256()
+ hasher := sha3.NewLegacyKeccak256()
hasher.Write(append(sessionKey, 0))
lookupKey := hasher.Sum(nil)