Byte Concatenator
Concatenates bytes, string, int and bool inputs in input port order (A || B || C ...)
Overview
Concatenates any number of connected input values sequentially into a single contiguous byte array (A || B || C || ...) following the top-to-bottom order of its dynamic input ports.
Each connected input port can be of type Bytes, String, Int, or Bool. Non-byte inputs are automatically converted to bytes using toBytesAuto: Bytes are copied as-is, String is encoded as UTF-8, Int (≥ 0) is encoded as minimal-length big-endian bytes (with 0 encoded as 1 byte 0x00), and Bool is encoded as 1 byte (0x01 for true, 0x00 for false). Unconnected input ports are skipped.
When to Use
- Assembling protocol frames or wire messages such as
Header || Nonce || Ciphertext || AuthTag. - Combining multiple fields (e.g.,
SenderID || ReceiverID || Timestamp || Payload) before computing a single Hash Digest, HMAC, or digital signature.
Parameter Configuration
Byte Concatenator has no static algorithm parameters in propertySchema. Its behavior is controlled entirely by the dynamic input ports you add and their top-to-bottom order on the node card.
Port I/O Specification
See Ports & Connections for general wiring rules, data type colors, and dynamic port creation.
Input Ports
| Attribute | Specification |
|---|---|
| Port Nature | Dynamic / Variable Input Ports |
| Initial Default on Canvas | Starts with 0 input ports (inputs: []) when placed on the canvas. |
| Port Count Range | 0 or more input ports (if 0 ports are connected, outputs a 0-byte Uint8Array). |
| Allowed Data Types | Bytes, String, Int, or Bool (automatically adopts the upstream port's data type when connected via the [+] handle). |
| Adding & Managing Ports | Drag any upstream output wire onto the [+] handle on the left side of the node card to create a new input port, or add/remove/reorder/rename ports in the inspector. |
| Evaluation & Ordering Rule | Inputs are concatenated strictly in top-to-bottom port order: Port_1 || Port_2 || ... || Port_N. |
Output Ports
Port Nature: Fixed Output Ports (2 total).
| Port Name | Port ID | Data Type | Visibility Condition | Description |
|---|---|---|---|---|
Combined |
combined |
Bytes |
Always visible | Single contiguous Uint8Array containing the concatenation of all connected input ports in top-to-bottom port order. |
Total Length |
length |
Int |
Always visible |
Error Cases
When any of the following conditions occurs at runtime, this node transitions to an ERROR state and downstream nodes connected to its outputs do not execute.
| Error Code | Default Engine Message | Trigger Condition |
|---|---|---|
BYTES_INVALID_ARGUMENT |
Invalid argument value | Raised when an argument (such as bit shift count, byte length, or negative integer) is invalid or negative. |
BYTES_INT_OVERFLOW |
The integer cannot be represented with the given length and sign | Raised when the integer value cannot fit within the specified fixed or port byte length. |
BYTES_SIZE_LIMIT |
Result length exceeds the limit | Raised when the resulting byte buffer would exceed the engine's maximum allocation limit. |
Examples
Packing Nonce + Ciphertext + Auth Tag into a Single Wire Payload
Combine the 12-byte Nonce, Ciphertext, and 16-byte GCM Auth Tag in order.
- Drag the
Noncewire onto the[+]input handle of Byte Concatenator (creating Port 1). - Drag the
Ciphertextwire onto[+](creating Port 2) and theAuth Tagwire onto[+](creating Port 3). - The
Combinedoutput port emitsNonce || Ciphertext || Tag.