Crc32

cometa.cryptography.crc32.crc32(data)[source]

Computes the CRC32 checksum for the given data.

CRC32 (Cyclic Redundancy Check) is used in Cardano for data integrity verification, particularly in Byron-era address encoding.

Parameters:

data (bytes | bytearray) – The data to compute the checksum for.

Returns:

The 32-bit CRC32 checksum.

Return type:

int

Example

>>> crc32(b"Hello, world!")
3957769958