NodeCrypto Help

Random Value

Category: Input/Output Data ยท Node Type ID: input-random

Generates a cryptographically secure random value of a user-selected type (bytes/string/int/bool)

Overview

Generates a fresh cryptographically secure pseudorandom value on every workflow execution using the platform CSPRNG (crypto.getRandomValues). Depending on the selected Type parameter, it produces random Bytes of a specified byte length, a random printable ASCII String, a uniform random Int within an inclusive range [Min, Max], or a random Bool.

Unlike deterministic fallback defaults on cipher nodes, Random Generator produces a new unpredictable value each time you click Run, making it ideal for generating fresh session keys, nonces, salts, and fuzzing inputs.

When to Use

Parameter Configuration

Parameter (ID)Type & DefaultVisibility ConditionDescription & Options
Type
type
select
Default: bytes
Always visible Chooses the primitive data type generated at runtime (bytes, string, int, or bool).
  • bytes: Bytes (Hex)
  • string: String (Text)
  • int: Int (Number)
  • bool: Bool (True/False)
Length
length
number
Default: 16
Supports Variable Reference ($var: int)
When type is bytes or string Number of bytes to generate when Type = bytes, or number of printable ASCII characters (0x21..0x7E) when Type = string. Clamped to the range 1..65536.
Min
intMin
number
Default: 0
Supports Variable Reference ($var: int)
When type is int Inclusive lower bound when Type = int. If Min > Max, the engine automatically swaps the bounds.
Max
intMax
number
Default: 100
Supports Variable Reference ($var: int)
When type is int Inclusive upper bound when Type = int.

Port I/O Specification

See Ports & Connections for general wiring rules, data type colors, and dynamic port creation.

Input Ports

This node has no input ports.

Output Ports

Port Nature: Fixed Output Ports (1 total).

Port NamePort IDData TypeVisibility ConditionDescription
Value bytes Bytes Always visible Outputs the generated random value in the selected data type (Bytes, String, Int, or Bool).

Error Cases

This node has no runtime failure cases (errorProfile: none) and always succeeds for any valid typed input.

Examples

Generating a Fresh 12-Byte AES-GCM Nonce

Produce a random 96-bit nonce for authenticated encryption.

  1. Set Type to Bytes and Length to 12.
  2. Connect the Random output port to the Nonce input port of AES Encrypt (with Cipher Mode = GCM) and also to the corresponding AES Decrypt node.