Skip to main content

CRC-64 checksum generator

Project description

CRC64ISO

Package for calculating checksums using 64-bit cyclic redundancy checks (CRC) according to the ISO 3309 standard.

Generator polynomial: x64 + x4 + x3 + x + 1

Reference: W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, "Numerical recipes in C", 2nd ed., Cambridge University Press. Pages 896ff.

Requirements

  • python 3.x

Examples

  • Calculate 64-bit checksum from a string:
from crc64iso.crc64iso import crc64

checksum = crc64iso.crc64("ILOVEMATH")
  • Calculate 64-bit checksum from incremental (bytes) data:
from crc64iso.crc64iso import crc64_pair, format_crc64_pair

crc_pair_1 = crc64_pair("ILOVE".encode())
crc_pair_2 = crc64_pair("MATH".encode(), crc_pair_1)
checksum = format_crc64_pair(crc_pair_2)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crc64iso-0.0.2.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

crc64iso-0.0.2-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page