Aliases

None.

Arguments

number
required
The number of random bytes before encoding. Converted to an integer, then checked against 0..1048576.

Returns

string
Base64 text containing the generated random bytes.
The size is converted to a native integer, then must be from 0 to 1048576 inclusive. Pass a whole-byte count; fractional input is truncated rather than explicitly rejected. Distinct from crypt.random, which returns raw bytes.

Example