Random
Class function
nevis.crypto.random.new()
Instantiates a new crypto random object.
Sample:
random = nevis.crypto.random.new()
Object methods
randBytes = random:getBytes(bytes)
Returns the specified number of random bytes as a Lua string. The result may contain binary data.
- bytes: The number of random bytes to generate.
Sample:
random = nevis.crypto.random.new()
randBytes = random:getBytes(29)
assert(randBytes.len() == 29)