Skip to main content
Version: 8.2411.x.x RR

Random object methods

MethodDescriptionSample
randByte = random:getBytes(bytes)bytes: Specify how many random bytes you needreturn: Specified number of random bytes as Lua string (note: this can be binary data).random = nevis.crypto.random.new()randBytes = random:getBytes(29)assert(randBytes.len() == 29)