move CreateAddress from ethutil/common to ethcrypto

This commit is contained in:
zelig 2014-06-29 16:08:33 +01:00
parent 5e50b50dc3
commit e3b911652d
2 changed files with 7 additions and 7 deletions

View File

@ -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:]
}

View File

@ -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:]
}