项目作者: Kalebu

项目描述 :
Cyclic Redundance Check hashing algorithm implemented in python
高级语言: Python
项目地址: git://github.com/Kalebu/crc16-modbus-in-Python.git
创建时间: 2021-02-20T16:14:41Z
项目社区:https://github.com/Kalebu/crc16-modbus-in-Python

开源协议:MIT License

下载


crc16-modbus-in-Python

Cyclic Redundance Check hashing algorithm implemented in python

A bit brief about CRC

A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents. On retrieval, the calculation is repeated and, in the event the check values do not match, corrective action can be taken against data corruption

Usage

  1. >> from crc import crc16
  2. >> example_str = 'Cyclic redundat check 16 modbus alogirthm in python'
  3. >> crc16(example_str)
  4. '396E'

All the credits to kalebu