crc
Module for CRC algorithms.
- class Crc32
Bases:
object
CRC32 class. It computes digests using CRC32 algorithm.
- static QuickDigest(data: Union[bytes, str]) bytes
Compute the digest (quick version).
- Parameters:
data (str or bytes) – Data
- Returns:
Computed digest
- Return type:
bytes
- static QuickIntDigest(data: Union[bytes, str]) int
Compute the digest as integer (quick version).
- Parameters:
data (str or bytes) – Data
- Returns:
Computed digest
- Return type:
bytes
- static DigestSize() int
Get the digest size in bytes.
- Returns:
Digest size in bytes
- Return type:
int
- class XModemCrc
Bases:
object
XMODEM-CRC class. It computes digests using XMODEM-CRC algorithm.
- static QuickDigest(data: Union[bytes, str]) bytes
Compute the digest (quick version).
- Parameters:
data (str or bytes) – Data
- Returns:
Computed digest
- Return type:
bytes
- static DigestSize() int
Get the digest size in bytes.
- Returns:
Digest size in bytes
- Return type:
int