%randstr( <format> )
Get random string built from input character classes.
Return: string
Build strings of random chars, useful for generating tokens and passcodes
Format similar to the Perl module String::Random
.
Format characters may include the following, and may be preceded by an integer repetition count:
Character | Description |
---|---|
c |
lowercase letters |
C |
uppercase letters |
n |
numbers |
a |
alphanumeric |
! |
punctuation |
. |
alphanumeric + punctuation |
s |
alphanumeric + |
o |
characters suitable for OTP (visually similar characters removed) |
b |
binary data |
There is no h
for "hex". Instead, use b
to create binary data, followed by the %hex(..)
function to convert it to hex.
Example
&reply.Reply-Message := "The random string output is %randstr(8a)"
Output
The random string output is 4Uq0gPyG