Dev HelpersOpen library
← Back

Compare checksums to detect an accidental change

Compare checksums to detect an accidental change in Python.

Open this example in the interactive library

Source code

import zlib
payload = b'release notes'
checksum = zlib.crc32(payload)
print(zlib.crc32(payload) == checksum, zlib.crc32(payload + b'!') == checksum)

Sample output

True False