Commit e3b91165 authored by zelig's avatar zelig

move CreateAddress from ethutil/common to ethcrypto

parent 5e50b50d
......@@ -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:]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment