OUR SITES NetworkRADIUS FreeRADIUS

%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:

Table 1. Character Classes
Character Description

c

lowercase letters [a-z]

C

uppercase letters [A-Z]

n

numbers [0-9]

a

alphanumeric

!

punctuation !"#$%&'()*+,-./:;<⇒?@[\\]^_{|}~`

.

alphanumeric + punctuation

s

alphanumeric + . and /

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