mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
p2p/rlpx: use crypto/subtle.XORBytes directly
This commit is contained in:
parent
da98e12697
commit
5a484d2393
1 changed files with 2 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ import (
|
|||
"crypto/ecdsa"
|
||||
"crypto/hmac"
|
||||
"crypto/rand"
|
||||
"crypto/subtle"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
|
@ -33,7 +34,6 @@ import (
|
|||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common/bitutil"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/crypto/ecies"
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
|
|
@ -677,6 +677,6 @@ func exportPubkey(pub *ecies.PublicKey) []byte {
|
|||
|
||||
func xor(one, other []byte) (xor []byte) {
|
||||
xor = make([]byte, len(one))
|
||||
bitutil.XORBytes(xor, one, other)
|
||||
subtle.XORBytes(xor, one, other)
|
||||
return xor
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue