web3-utilsFunctionsrandomBytesrandomBytes CallablerandomBytes(size: number): Uint8ArrayReturns a random byte array by the given bytes size@exampleconsole.log(web3.utils.randomBytes(32));> Uint8Array(32) [ 93, 172, 226, 32, 33, 176, 156, 156, 182, 30, 240, 2, 69, 96, 174, 197, 33, 136, 194, 241, 197, 156, 110, 111, 66, 87, 17, 88, 67, 48, 245, 183 ]Parameterssize: numberThe size of the random byte array returnedReturns Uint8Arrayrandom byte array
Returns a random byte array by the given bytes size