randomHex
Callable
Parameters
byteSize: number
The size of the random hex string returned
Returns string
- random hex string
console.log(web3.utils.randomHex(32));
> 0x139f5b88b72a25eab053d3b57fe1f8a9dbc62a526b1cb1774d0d7db1c3e7ce9e
The size of the random hex string returned
console.log(web3.utils.randomHex(32));
> 0x139f5b88b72a25eab053d3b57fe1f8a9dbc62a526b1cb1774d0d7db1c3e7ce9e
Returns a random hex string by the given bytes size