Checksum
Synopsis
Calculates cryptographic and non-cryptographic checksums of field values.
Schema
- checksum:
field: <ident>
algorithm: <string>
target_field: <string>
output_format: <string>
include_fields: <array>
exclude_fields: <array>
uppercase: <boolean>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
The following fields are used to define the processor:
Field | Required | Default | Description |
---|---|---|---|
field | Y | - | Source field containing data to checksum |
algorithm | Y | - | Checksum algorithm (crc32, crc64, adler32, fnv32, fnv64, fnv128, md5, sha1, sha256, sha512) |
target_field | N | {field}_{algorithm} | Target field to store checksum result |
output_format | N | hex | Output format (hex, base64, decimal) |
include_fields | N | - | Array of fields to include for object checksums |
exclude_fields | N | - | Array of fields to exclude from object checksums |
uppercase | N | false | Output checksum in uppercase format |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if checksum calculation fails |
ignore_missing | N | false | Skip processing if referenced field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |
Details
Calculates checksums using various algorithms ranging from simple CRC checksums to cryptographic hashes like SHA-256. The processor supports different data types including strings, byte arrays, objects, and arrays.
The processor handles multiple algorithm types including non-cryptographic checksums (CRC32, CRC64, Adler32, FNV variants) and cryptographic hashes (MD5, SHA-1, SHA-2 family). For object checksums, it can selectively include or exclude specific fields.
When calculating checksums for objects, fields are processed in alphabetical order to ensure consistent results. The processor formats object data as field:value
pairs joined with pipes (|) for reliable checksum calculation.
The processor supports various output formats including hexadecimal (default), base64, and decimal. For large checksums, decimal format may fall back to hexadecimal representation to prevent overflow.
MD5 and SHA-1 algorithms are considered cryptographically weak and should only be used for non-security purposes like data integrity verification or deduplication.
Examples
Basic File Checksum
Calculating SHA-256 checksum of file content... |
|
generates cryptographic hash: |
|
Object Checksum with Field Selection
Creating checksum from specific object fields... |
|
calculates checksum from selected fields: |
|
Fast CRC Verification
Using fast CRC32 for data verification... |
|
produces numeric CRC value: |
|
Array Content Checksum
Checksumming array data for deduplication... |
|
generates content fingerprint: |
|
Configuration Integrity Check
Verifying configuration integrity with excluded sensitive fields... |
|
creates integrity hash without sensitive data: |
|