Home Contents | # cipher.random | Cipher | Core4 Lua Commands

## SYNOPSIS

1. n = cipher.random()
2. str = cipher.random(length)

## DESCRIPTION

Without arguments, returns a random 32-bit integer. With the optional length argument, returns a string of the given length filled with random data.

## RETURN VALUE

A number or a string, depending on arguments.

## NOTES

Gets random numbers from the /dev/random device.

## SEE ALSO

aes:cbcDecrypt, aes:cbcEncrypt, aes:clearIV, aes:decrypt, aes:encrypt, aes:getIV, aes:padDecrypt, aes:padEncrypt, aes:setIV, aes:setupDecrypt, aes:setupEncrypt, cipher.aes