Endian Converter
Reverses the byte order of the input (big-endian <-> little-endian)
Overview
Reverses the byte order of the input byte array from first-to-last (converting between Big-Endian and Little-Endian byte representations). For example, the 4-byte sequence 01 02 03 04 becomes 04 03 02 01. Bits within each individual byte are not reversed.
When to Use
- Converting 16-bit, 32-bit, 64-bit, or 256-bit byte fields between network byte order (Big-Endian) and x86/ARM host or little-endian protocol order (such as ChaCha20, Ed25519, or Bitcoin hashes).
Parameter Configuration
Endianness Swap has no configuration parameters; it reverses the byte sequence of any connected Bytes buffer.
Port I/O Specification
See Ports & Connections for general wiring rules, data type colors, and dynamic port creation.
Input Ports
Port Nature: Fixed Input Ports (1 total).
| Port Name | Port ID | Data Type | Required | Visibility Condition | Description |
|---|---|---|---|---|---|
Value |
data |
Bytes |
Required | Always visible | Input byte array (Uint8Array) whose byte order will be reversed. |
Output Ports
Port Nature: Fixed Output Ports (1 total).
| Port Name | Port ID | Data Type | Visibility Condition | Description |
|---|---|---|---|---|
Result |
result |
Bytes |
Always visible |
Error Cases
This node has no runtime failure cases (errorProfile: none) and always succeeds for any valid typed input.
Examples
Reversing a 32-Byte Hash for Little-Endian Display
Reverse the byte order of a 32-byte digest.
- Connect the
Digestoutput of Hash Digest toDataon Endianness Swap;Swappedemits the reversed 32-byte array.