Web3S_Demo > Web 3S Ethereum Function Library > Generate Ethereum Address from Public Key (Bytes)

Generate Ethereum Address from Public Key (Bytes)

Generates Ethereum Address using keccak-256 algorithm from public key provided as an array of bytes.
If the public key is not 64 Bytes (128 characters) long or contains non-hex characters
the return bool will be false if failed to Generate Ethereum Address and an error message will be returned.

Inputs

In
Exec

Public Key
Array of Bytes

The public key.

Outputs

Out
Exec

Error Message
String

returns false if the string provided isn't 40 Bytes or includes non-Hex characters.

Ethereum Address
String

returns false if the string provided isn't 40 Bytes or includes non-Hex characters.

Success
Boolean

True if EthereumAddress is successfully generated. Otherwise, false