Bring these concepts with you
Your implementation
- Implement an IEEE 802.3 256-entry CRC32 calculation table for fast byte processing.
- Compare the computed CRC32 unsigned 32-bit integer against the entry.crc value.
- Throw Error('Checksum mismatch') if the data does not match the stored checksum.
function verifyChecksum(data, expectedCrc) {
// Compute CRC32 of data and compare with expected unsigned 32-bit int.
}Need a hint?
- Precomputing the CRC32 table with polynomial 0xEDB88320 makes computation linear in input length.
- Ensure the comparison treats values as unsigned 32-bit integers using (crc >>> 0).
Saved on this device · 0 / 6000 · Do not include passwords or private data.
Acceptance checks
From the folder containing your downloaded files, run:
node checks.mjs ./starter.mjs 1 through 6 4This runs checks up to this step. Earlier steps must work first. Mark each result only after checking your implementation; the website does not run or grade it.
Record your attempt to enable the checklist and reference comparison.
Compare with the reference
Attempt the step first, then compare decisions and behavior. There can be more than one correct implementation.
Your interviewer asks
Why is CRC32 suitable for detecting accidental bit rot but inadequate for preventing deliberate tampering by an adversary?
Say your answer aloud, then record the trade-offs and evidence in your notes above.