CRC Generator
Universal Parametric Cyclic Redundancy Check (Rocksoft Model: 8, 16, 32, 64-bit)
Overview
Computes a non-cryptographic Cyclic Redundancy Check (CRC) checksum over a byte array using the universal Rocksoft™ Parametric CRC Model across 8-bit, 16-bit, 32-bit, or 64-bit register widths.
You can select one of 7 built-in industry presets (such as CRC-32 for Ethernet/ZIP/PNG, CRC-16/CCITT-FALSE, CRC-16/MODBUS, or CRC-64/XZ) or switch CRC Algorithm Preset to Custom to reveal five Rocksoft parameters (Width, Polynomial, Initial Value, Reflect In, Reflect Out, and XOR Out). The computed checksum is emitted as a big-endian byte array (1, 2, 4, or 8 bytes).
When to Use
- Calculating frame check sequences (FCS) or packet checksums for industrial protocols (MODBUS, CAN, XMODEM), storage formats (ZIP, PNG, XZ), or smartcard APDU frames.
- Prototyping custom proprietary CRC polynomials using the full Rocksoft parameter set.
Parameter Configuration
| Parameter (ID) | Type & Default | Visibility Condition | Description & Options |
|---|---|---|---|
CRC Algorithm Presetpreset |
selectDefault: CRC-32/ISO-HDLC |
Always visible | Selects a standard CRC preset or custom to configure raw Rocksoft model parameters.
|
Custom Width (Bits)customWidth |
selectDefault: 32 |
Always visible | CRC register width in bits (8, 16, 32, or 64), producing a 1, 2, 4, or 8-byte big-endian output. Only visible when Preset = custom.
|
Custom Polynomial (Hex)customPoly |
hexDefault: 04C11DB7 |
Always visible | Generator polynomial in hexadecimal (without leading MSB 1, e.g., 04C11DB7 for CRC-32). Only visible when Preset = custom. |
Custom Initial Value (Hex)customInit |
hexDefault: FFFFFFFF |
Always visible | Initial register fill value in hexadecimal (e.g., FFFFFFFF). Only visible when Preset = custom. |
Reflect In (refIn)customRefIn |
booleanDefault: true |
Always visible | When enabled (true), reflects each input byte LSB-first before shifting into the register. Only visible when Preset = custom. |
Reflect Out (refOut)customRefOut |
booleanDefault: true |
Always visible | When enabled (true), reflects the final register bit order before applying XOR Out. Only visible when Preset = custom. |
Custom XOR Out (Hex)customXorOut |
hexDefault: FFFFFFFF |
Always visible | Hexadecimal mask XORed with the final register value before output (e.g., FFFFFFFF). Only visible when Preset = custom. |
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 |
|---|---|---|---|---|---|
Data |
data |
Bytes |
Required | Always visible | Input byte array (Uint8Array) over which to compute the CRC. |
Output Ports
Port Nature: Fixed Output Ports (1 total).
| Port Name | Port ID | Data Type | Visibility Condition | Description |
|---|---|---|---|---|
Checksum |
checksum |
Int |
Always visible | Computed CRC checksum as a big-endian byte array (1B for 8-bit, 2B for 16-bit, 4B for 32-bit, 8B for 64-bit). |
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 |
|---|---|---|
INVALID_CRC_PARAMETER |
Invalid CRC custom parameter (Hex) | Raised when a custom Rocksoft CRC parameter (Polynomial, Initial Value, or XOR Out) is not a valid hexadecimal string. |
Examples
Verifying the Standard "123456789" Check Value (0xCBF43926)
Compute the IEEE 802.3 CRC-32 of the ASCII string "123456789".
- Convert
"123456789"to bytes via String to Bytes and connect toData. - Select
CRC-32 (IEEE 802.3 / Ethernet / ZIP / PNG);CRC Checksumoutputs the 4-byte buffercbf43926.