Articles in this section

random helper

Use the random helper to generate random strings or numeric sequences. The first argument specifies the generation method—“crypto,” “uuid,” or “number”—while the second (optional) argument specifies the output length. If no length is provided, the default is 32 characters.

Usage

{{random "crypto" length}} {{random "uuid" length}} {{random "number" length}}
  • "crypto" returns a random alphanumeric string of the specified length, using a cryptographic approach.

  • "uuid" returns a shorter alphanumeric string resembling a UUID fragment (though not a standard RFC-4122 UUID).

  • "number" returns a numeric string of the specified length (e.g., "123456...").

  • length is an integer controlling how many characters (or digits) to generate. The default is 32 if omitted.

Examples

  1. Generate a short ‘crypto’ string 

    {{random "crypto" 8}}

    Might produce something like 9b72abf5.

  2. Generate a short ‘uuid’ string 

    {{random "uuid" 5}}

    Could return a 5-character token like 47c1a.

  3. Generate a numeric string 

    {{random "number" 9}}

    Might yield 738495210.

Tip

  • Use "crypto" when you need an alphanumeric string with higher randomness (e.g., quick tokens or IDs).

  • "uuid" returns a shorter alphanumeric sequence intended for unique but less structured identifiers.

  • "number" is ideal if you specifically need numeric-only identifiers.

  • If you omit the length argument, a 32-character (or digit) result is returned by default.