Skip to main content
Version: 7.2405.x.x LTS

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)