BSD Sum Checksum

Compute explicit bsdSum16 over caller bytes, bounded4096 bytes and no text encoding ambiguity; noncryptographic checksum does not establish authenticity.

Description

A BSD sum rotates a sixteen-bit accumulator before adding each byte.

A BSD sum rotates a sixteen-bit accumulator before adding each byte.1

This checksum detects some changes but is not a cryptographic authenticator. Use BSD Sum Checksum to evaluate the supplied inputs under the specific model below.

When to use BSD Sum Checksum

Use BSD Sum 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 BSD Sum Checksum and understand its results

  1. Choose the intended encoding, alphabet or check and keep the exact character, key and measurement conventions described below.
  2. Enter Byte values using the field table and validation rules below, then run the tool.
  3. Read Bsd sum16 and interpret units, signs, ordering and placeholders as explained below.
  4. 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 fieldMeaningValue typeRequirement
byteValuesByte valuesarray of numberRequired; constraints below

Enter a nonempty array of at most 4096 integer bytes. For each byte rotate the 16-bit accumulator right by one bit, add the byte and keep the low 16 bits. Return the BSD checksum; unlike XOR or simple addition its sequence matters, but it is still not cryptographic authentication.

state=0; state←(rotateRight16(state,1)+byte) & 65535

Field order, units and branch conditions follow the implementation explanation above.

Output fieldMeaningValue type
bsdSum16Bsd sum16number
json
{
  "input": {
    "byteValues": [
      1,
      2,
      3
    ]
  },
  "output": {
    "bsdSum16": 16388
  }
}

Limitations and assumptions

This checksum detects some changes but is not a cryptographic authenticator. 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 SysV Checksum for a related task: A System V sum folds a byte total into a sixteen-bit value.

Use XOR Byte Checksum for a related task: An XOR checksum combines byte values with bitwise exclusive-or.

References

  1. BSD Sum Checksum — tool.io

Similar or alternative tools

  • SysV Checksum

    A System V sum folds a byte total into a sixteen-bit value.

  • XOR Byte Checksum

    An XOR checksum combines byte values with bitwise exclusive-or.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies