What is @aws-crypto/crc32?
The @aws-crypto/crc32 package is a JavaScript implementation of the CRC32 algorithm, which is used to compute a cyclic redundancy check (CRC) value for a given input. This is useful for error-checking and ensuring the integrity of data.
Calculate CRC32 checksum
This feature allows you to calculate the CRC32 checksum of a given input buffer. The input is a Uint8Array, and the output is a number representing the CRC32 checksum.
const { crc32 } = require('@aws-crypto/crc32');
const checksum = crc32(new Uint8Array([0x00, 0x01, 0x02]));
console.log(checksum);