proxyprotocol.checksum

proxyprotocol.checksum.crc32c: Checksum | None = None

The CRC32C checksum function, if the crc32c library is installed.

class proxyprotocol.checksum.Checksum(*args, **kwargs)[source]

Provides typing compatible with the crc32c.crc32c function, if it is installed.

abstract __call__(val, crc=Ellipsis)[source]

The checksum function.

Parameters:
  • val (bytes) – The bytestring to checksum.

  • crc (int) – The checksum of previous portions of data.

Return type:

int