https://github.com/blievrouw/crc64iso
64-bit CRC (ISO 3309) checksum generator using python 3.x
https://github.com/blievrouw/crc64iso
checksum crc-64 crc64 cyclic-redundancy-check data-integrity digest iso3309 python3
Last synced: 4 months ago
JSON representation
64-bit CRC (ISO 3309) checksum generator using python 3.x
- Host: GitHub
- URL: https://github.com/blievrouw/crc64iso
- Owner: blievrouw
- License: mit
- Created: 2018-08-23T17:31:14.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-23T17:37:33.000Z (almost 8 years ago)
- Last Synced: 2025-10-21T19:36:44.436Z (8 months ago)
- Topics: checksum, crc-64, crc64, cyclic-redundancy-check, data-integrity, digest, iso3309, python3
- Language: Python
- Homepage: https://pypi.org/project/crc64iso/
- Size: 13.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
### Installation
```
pip install crc64iso
```
[PyPI](https://pypi.org/project/crc64iso/)
### 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)
```