CRC32 is useful for detecting accidental changes to a byte sequence. Record the input encoding so different producers compute the same checksum.
Worked example
import * as z from "node:zlib";
const data = Buffer.from("sample sample sample");
console.log(z.crc32(data).toString(16));Result
f552df35Implementation notes
Keep checksums and cryptographic authentication separate in the design. A checksum meant for transfer diagnostics does not authenticate a sender.
Try it yourself
Compare the bytes of a line with and without its trailing newline.
Open the Node.js example →Editorial date October 30, 2026 · Published December 6, 2026