Static Value
Provides a constant value of a user-selected type (bytes/string/int/bool)
Overview
Provides a constant, deterministic value of a user-selected primitive data type (Bytes, String, Int, or Bool) into the workflow graph. When you change the Type parameter, both the visible value input field in the property inspector and the runtime type of the single Value output port adapt to match the selected type.
In Bytes mode, the hexadecimal string entered in Value (Bytes) is validated and decoded into a raw Uint8Array before execution. In Int mode, integer literals of arbitrary precision are parsed into a signed bigint, allowing 64-bit counters, RSA exponents, or large finite-field constants without JavaScript floating-point precision loss. All value fields also support binding to a workspace variable reference ($var) of the matching type.
When to Use
- Supplying a known cryptographic key, initialization vector (IV), nonce, or test-vector message from a standard specification (such as NIST CAVP or RFC test vectors).
- Feeding a constant integer (such as a slice offset, byte length, or bit-shift count) or boolean flag into downstream utility or script nodes.
- Binding a single shared constant from the Variable Registry (
$var) so multiple nodes in a workflow reference the same key or parameter.
Parameter Configuration
| Parameter (ID) | Type & Default | Visibility Condition | Description & Options |
|---|---|---|---|
Typetype |
selectDefault: bytes |
Always visible | Selects the primitive data type emitted by the Value output port and determines which value editor field is shown below.
|
Value (Bytes)valueBytes |
hexDefault: 00112233445566778899aabbccddeeff |
When type is bytes |
Hexadecimal byte string (even number of hex digits 0-9a-fA-F; whitespace is ignored). Empty string produces a 0-byte Uint8Array. |
Value (String)valueString |
textareaDefault: Hello NodeCrypto! |
When type is string |
Literal UTF-8 text string emitted directly on the Value port when Type = string. |
Value (Int)valueInt |
numberDefault: 0 |
When type is int |
Signed arbitrary-precision integer literal (parsed as bigint; defaults to 0 if blank) emitted when Type = int. |
Value (Bool)valueBool |
selectDefault: false |
When type is bool |
Boolean constant (true or false) emitted when Type = bool.
|
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 Name | Port ID | Data Type | Visibility Condition | Description |
|---|---|---|---|---|
Value |
value |
Bytes |
Always visible | Emits the configured constant 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
Supplying a 128-bit AES Test Vector Key
Feed the NIST FIPS 197 Appendix B 16-byte key into an AES Encrypt node.
- Set Type to
Bytes (Hex). - Enter
2b7e151628aed2a6abf7158809cf4f3cin Value (Bytes). - Connect the
Valueoutput port to theKeyinput port of an AES Encrypt node.