Skip to content

SunBeau/crc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

CRC

CRC is a simple command-line utility to compute various CRC values for one or more files.

It supports three CRC algorithms (selected via --mode=<alg>):

  • crc64-ecma (default) uses the ECMA polynomial to compute a 64-bit CRC.
  • crc64-iso uses the ISO polynomial to compute a 64-bit CRC.
  • crc32 uses the IEEE polynomial to compute a 32-bit CRC. This is equivalent to the crc32 linux binary.

If only a single file is specified on the command line, then only the hexadecimal hash is printed. If more than one file is specified, the output will be

<hash><tab><filename>

for each file.

Installation

go get github.com/augustoroman/crc

Usage

Usage: ./main [-mode=<MODE>] [file [file ...] | -dir=<DIR>]
  -dir string
    	Dir to use.
  -mode string
    	CRC method to use.  Valid values are 'crc32' (IEEE), 'crc64-iso', and 'crc64-ecma' (default "crc64-ecma")
# Compute the default hash (crc64 w/ ECMA polynomial) of one or more files.
crc <file> [<file> ...]
# Compute the crc64 hash with ISO polynomial.
crc --mode=crc64-iso <file> [<file> ...]
# Compute the crc32 hash (with the IEEE polynomial).
crc --mode=crc32 <file> [<file> ...]

License

This is released under the MIT license

About

CRC is a simple command-line utility to compute CRC values for one or more files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%