79440513

Date: 2025-02-14 20:35:04
Score: 2.5
Natty:
Report link

So here is what I learned after digging and digging 🥲

const checksumNumber = checksums.crc32(content);
const buffer = Buffer.alloc(4);
buffer.writeUInt32BE(checksumNumber, 0);
const checksum = buffer.toString("base64");

GitHub Repo

You can find a complete example here: https://github.com/kasir-barati/bugs/blob/6a415e849b088d8bc82d5c8eadd532c242a530fc/generate-checksum.ts#L12-L32

NOTE: even though the repo's name might be misleading in this specific case since I have tested it and if you also clone the repo and try to run it you'll see it will log the same thing.

References

These two helped me a lot in forging this solution.

Reasons:
  • Blacklisted phrase (1): Stackoverflow
  • Blacklisted phrase (1): helped me a lot
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Mohammad Jawad Barati