binascii.crc32()
binascii.crc32() is a Python function in the Binascii Module category. Computes CRC-32 checksum of data (for error detection, not security). The syntax is binascii.crc32(data, value=0). Parameters: data — bytes. Returns: CRC-32 integer (unsigned). A typical example: binascii.crc32(b"hello") # 907060870
binascii.crc32(b" world", 907060870) # Continue checksum. A close sibling is binascii.hexlify(), which converts bytes to hexadecimal representation (like bytes.hex()). A close sibling is binascii.unhexlify(), which converts hexadecimal representation back to bytes. A close sibling is binascii.a2b_base64(), which converts base64 ASCII string to bytes (alternative to base64.b64decode). A close sibling is binascii.b2a_base64(), which converts bytes to base64 ASCII string. More about this category: Binary data conversions — hexlify, unhexlify, crc32, base64. Related Binascii Module entries: binascii.hexlify(), binascii.unhexlify(), binascii.a2b_base64(), binascii.b2a_base64(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try binascii.crc32() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.