SysV Checksum
Compute explicit sysvSum16 over caller bytes, bounded4096 bytes and no text encoding ambiguity; noncryptographic checksum does not establish authenticity.
Description
A System V sum folds a byte total into a sixteen-bit value.
A System V sum folds a byte total into a sixteen-bit value.1
This lightweight checksum is distinct from a cryptographic hash or signature. Use SysV Checksum to evaluate the supplied inputs under the specific model below.
When to use SysV Checksum
Use SysV Checksum to evaluate the supplied inputs under the specific model below. Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
How to use SysV Checksum and understand its results
- Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
- Enter Byte values using the field table and validation rules below, then run the tool.
- Read Sysv sum16 and interpret units, signs, ordering and placeholders as explained below.
- If the tool reports an input error, correct that field and rerun. A successful false result, empty match list or unknown-evidence placeholder has the specific meaning described here; check the limitations before applying the result.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| byteValues | Byte values | array of number | Required; constraints below |
Enter a nonempty array of at most 4096 integer bytes from 0 to 255. Sum all bytes, fold high 16 bits into low 16 bits twice and return the 16-bit System V checksum. This weak additive checksum does not authenticate a file or resist deliberate collisions.
sum = Σbytes; fold(sum) = (sum & 65535)+(sum >>> 16); checksum = fold(fold(sum)) Field order, units and branch conditions follow the implementation explanation above.
| Output field | Meaning | Value type |
|---|---|---|
| sysvSum16 | Sysv sum16 | number |
{
"input": {
"byteValues": [
1,
2,
3
]
},
"output": {
"sysvSum16": 6
}
} Limitations and assumptions
This lightweight checksum is distinct from a cryptographic hash or signature. Apply the exact scope and assumptions described above.
All listed fields require explicit values. Unexpected fields, incorrect types, nonfinite numbers and sparse arrays fail validation. Domain-specific bounds, alignments and supported tokens are stated above; extremely large inputs or outputs can also be rejected. These errors differ from successful results such as false, no matches or unknown evidence.
Alternative or Complementary methods
Use BSD Sum Checksum for a related task: A BSD sum rotates a sixteen-bit accumulator before adding each byte.
Use XOR Byte Checksum for a related task: An XOR checksum combines byte values with bitwise exclusive-or.
References
-
SysV Checksum — tool.io
Similar or alternative tools
- BSD Sum Checksum
A BSD sum rotates a sixteen-bit accumulator before adding each byte.
- XOR Byte Checksum
An XOR checksum combines byte values with bitwise exclusive-or.