Skip to content

cmodii/crc_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRC Command Line Interface

About

A small command-line tool for calculating CRC values (up to CRC-32) for a given input.

The CRC (Cyclic Redundancy Check) algorithm is utilized to detect errors or corruption during data transmission. It is reliable since the receiver can verify data integrity using only the data itself and a generator polynomial known to both sender and receiver.

If you want to get a good (but not necessarily explicit) understanding of CRCs then refer to sunshine2k's article.


Installation & Usage

This project requires CMake and Ninja to build.

# Clone the repository
$ git clone https://github.com/cmodii/crc_cli

# Create a build directory
$ mkdir build
$ cd build

# Build the app
$ cmake ..
$ ninja

# Run the app
$ cli

Supported modes

Mode Polynomial (hex)
crc32 0x4C11DB7
crc16 0xA001
crc8 0x7

Tip

You can modify the polynomial values in the checksum header file and the lookup tables for each CRC in their respective source files: crc8, crc16, crc32.


Example

Running the command:

cli crc16 "CRC CLI in action"

Produces:

image

About

Command line tool that performs CRC calculations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors