Code Monkey home page Code Monkey logo

crc16-ccitt's Introduction

CRC16-CCITT


CRC校验(循环冗余校验)

http://www.ip33.com/crc.html

CRC校验(循环冗余校验)小知识
CRC即循环冗余校验码(Cyclic Redundancy Check):是数据通信领域中最常用的一种查错校验码,其特征是信息字段和校验字段的长度可以任意选定。循环冗余检查(CRC)是一种数据传输检错功能,对数据进行多项式计算,并将得到的结果附在帧的后面,接收设备也执行类似的算法,以保证数据传输的正确性和完整性。

CRC算法参数模型解释: 
NAME:参数模型名称。 
WIDTH:宽度,即CRC比特数。 
POLY:生成项的简写,以16进制表示。例如:CRC-32即是0x04C11DB7,忽略了最高位的"1",即完整的生成项是0x104C11DB7。 
INIT:这是算法开始时寄存器(crc)的初始化预置值,十六进制表示。 
REFIN:待测数据的每个字节是否按位反转,True或False。 
REFOUT:在计算后之后,异或输出之前,整个数据是否按位反转,True或False。 
XOROUT:计算结果与此参数异或后得到最终的CRC值。

此依赖共含4个非常用的CRC16校验算法

CRC16-CCITT(0x1021)

CRC16-CCITT-FALSE(0x1021)

CRC16-XMODEM(0x1021)

CRC16-X25(0x1021)

常见CRC参数模型:

常见CRC参数模型

JAVA-依赖使用 How to Use:

Step 1. Add the JitPack repository to your build file

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.damonlear:CRC16-CCITT:1.0.0'
}

crc16-ccitt's People

Contributors

damonlear avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.