:py:mod:`dissect.util.hash.crc32` ================================= .. py:module:: dissect.util.hash.crc32 Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: dissect.util.hash.crc32.update dissect.util.hash.crc32.crc32 .. py:function:: update(crc: int, data: bytes, polynomial: int = 3988292384, table: tuple[int, Ellipsis] | None = None) -> int Update CRC32 checksum with data. :param crc: The initial value of the checksum. :param data: The data to update the checksum with. :param polynomial: The (reversed) polynomial to use for the CRC32 calculation. Default is 0xEDB88320 (crc32b). :param table: Optional precomputed CRC32 table. If None, a table will be generated using the given polynomial. .. py:function:: crc32(data: bytes, value: int = 0, polynomial: int = 3988292384, table: tuple[int, Ellipsis] | None = None) -> int Calculate CRC32 checksum of some data, with an optional initial value and polynomial. :param data: The data to calculate the checksum of. :param value: The initial value of the checksum. Default is 0. :param polynomial: The (reversed) polynomial to use for the CRC32 calculation. Default is 0xEDB88320 (crc32b). :param table: Optional precomputed CRC32 table. If None, a table will be generated using the given polynomial.