forked from cerc-io/plugeth
move CreateAddress from ethutil/common to ethcrypto
This commit is contained in:
parent
5e50b50dc3
commit
e3b911652d
@ -25,3 +25,10 @@ func Sha3Bin(data []byte) []byte {
|
||||
|
||||
return d.Sum(nil)
|
||||
}
|
||||
|
||||
// Creates an ethereum address given the bytes and the nonce
|
||||
func CreateAddress(b []byte, nonce *big.Int) []byte {
|
||||
addrBytes := append(b, nonce.Bytes()...)
|
||||
|
||||
return Sha3Bin(addrBytes)[12:]
|
||||
}
|
||||
|
@ -52,10 +52,3 @@ var (
|
||||
Big32 = big.NewInt(32)
|
||||
Big256 = big.NewInt(0xff)
|
||||
)
|
||||
|
||||
// Creates an ethereum address given the bytes and the nonce
|
||||
func CreateAddress(b []byte, nonce *big.Int) []byte {
|
||||
addrBytes := append(b, nonce.Bytes()...)
|
||||
|
||||
return Sha3Bin(addrBytes)[12:]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user