NodeCrypto Help

CRC Generator

Category: Hash & MAC & CRC · Node Type ID: utility-crc

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

Parameter Configuration

Parameter (ID)Type & DefaultVisibility ConditionDescription & Options
CRC Algorithm Preset
preset
select
Default: CRC-32/ISO-HDLC
Always visible Selects a standard CRC preset or custom to configure raw Rocksoft model parameters.
  • CRC-32/ISO-HDLC: CRC-32 / ISO-HDLC (Ethernet/PNG/ZIP)
  • CRC-32/CASTAGNOLI: CRC-32C / Castagnoli (iSCSI/Ext4)
  • CRC-16/MODBUS: CRC-16 / MODBUS (Industrial)
  • CRC-16/CCITT-FALSE: CRC-16 / CCITT-FALSE
  • CRC-16/XMODEM: CRC-16 / XMODEM
  • CRC-16/USB: CRC-16 / USB
  • CRC-16/ISO-14443-A: CRC-16 / ISO 14443-A (MIFARE/NFC)
  • CRC-8/SMBUS: CRC-8 / SMBUS
  • CRC-8/MAXIM: CRC-8 / MAXIM (Dallas/1-Wire)
  • CRC-64/ECMA: CRC-64 / ECMA-182
  • CRC-64/XZ: CRC-64 / XZ (GO-ISO)
  • custom: Custom (Rocksoft Model Parameters)
Custom Width (Bits)
customWidth
select
Default: 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.
  • 8: 8-bit
  • 16: 16-bit
  • 32: 32-bit
  • 64: 64-bit
Custom Polynomial (Hex)
customPoly
hex
Default: 04C11DB7
Supports Variable Reference ($var: bytes)
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
hex
Default: FFFFFFFF
Supports Variable Reference ($var: bytes)
Always visible Initial register fill value in hexadecimal (e.g., FFFFFFFF). Only visible when Preset = custom.
Reflect In (refIn)
customRefIn
boolean
Default: true
Supports Variable Reference ($var: bool)
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
boolean
Default: true
Supports Variable Reference ($var: bool)
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
hex
Default: FFFFFFFF
Supports Variable Reference ($var: bytes)
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 NamePort IDData TypeRequiredVisibility ConditionDescription
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 NamePort IDData TypeVisibility ConditionDescription
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 CodeDefault Engine MessageTrigger 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".

  1. Convert "123456789" to bytes via String to Bytes and connect to Data.
  2. Select CRC-32 (IEEE 802.3 / Ethernet / ZIP / PNG); CRC Checksum outputs the 4-byte buffer cbf43926.