Coder Social home page Coder Social logo

jaybrown / cn Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 33 KB

Apple's open source command line interface to CommonNumerics routines (CRC-8/16/32/64, Base16/32/64)

License: Other

Roff 9.71% C 90.17% Makefile 0.12%
commonnumerics crc crc-32 crc-16 crc-8 adler-32 base64 base32 base16 cli

cn's Introduction

The cn command line interface to CommonNumerics routines has been published by Apple as part of their Open Source project.

It belongs to the CommonCrypto library, but it has not been built/installed into macOS.

You can install cn using Homebrew (recommended) with brew tap JayBrown/cn && brew install cn (tap repo with formula), or you can manually make/build with make clean and make cn.

Functionality (man page)

cn(1)                     BSD General Commands Manual                    cn(1)

NAME
     cn -- Command line interface to CommonNumerics routines.

SYNOPSIS
     cn [-p prompt] [command] [command_options] [command_args]

DESCRIPTION
     A simple command line utility allowing you to perform CRC and Base Encode/Decode with the Common Numerics functions.

     cn has the following standard options for all sub-commands:

     -h            Show help information.

     -a            Use the specified algorithm.  The CRC, Encode, and Decode commands have various algorithms that can be used
                   on data provided to them.

     -s -<string>  Performs the operation on the specified string value.

     -v            Function in Verbose mode.

CN COMMAND SUMMARY
     cn currently only provides functions for two activities: CRC calculation and Base Encoding and Decoding (base16, base32,
     base64).

     Here are brief descriptions of all the cn commands:

     crc            Perform a CRC on the data provided either as a string or on stdin.

                    Algorithms
                    10 - kCN_CRC_8
                    11 - kCN_CRC_8_ICODE
                    12 - kCN_CRC_8_ITU
                    13 - kCN_CRC_8_ROHC
                    14 - kCN_CRC_8_WCDMA
                    20 - kCN_CRC_16
                    21 - kCN_CRC_16_CCITT_TRUE
                    22 - kCN_CRC_16_CCITT_FALSE
                    23 - kCN_CRC_16_USB
                    24 - kCN_CRC_16_XMODEM
                    25 - kCN_CRC_16_DECT_R
                    26 - kCN_CRC_16_DECT_X
                    27 - kCN_CRC_16_ICODE
                    28 - kCN_CRC_16_VERIFONE
                    29 - kCN_CRC_16_A
                    30 - kCN_CRC_16_B
                    31 - kCN_CRC_16_Fletcher
                    40 - kCN_CRC_32_Adler
                    41 - kCN_CRC_32
                    42 - kCN_CRC_32_CASTAGNOLI
                    43 - kCN_CRC_32_BZIP2
                    44 - kCN_CRC_32_MPEG_2
                    45 - kCN_CRC_32_POSIX
                    46 - kCN_CRC_32_XFER
                    60 - kCN_CRC_64_ECMA_182

     Encode|Decode  Encode or Decode data provided either as a string or on stdin using one of the algorithms specified below.

                    Algorithms
                    1 - kCNEncodingBase64
                    2 - kCNEncodingBase32
                    3 - kCNEncodingBase32Recovery
                    4 - kCNEncodingBase32HEX
                    5 - kCNEncodingBase16

ENVIRONMENT
     CN_READ_SIZE  The "read size" to use when processing incoming data.

     CN_WIDTH      The number of columns in which to output data when performing a base encoding.  The default is 64 columns.

HISTORY
     cn was introduced in Mac OS X version 10.9 and iOS version 7.0.

Darwin                         February 16, 2017                        Darwin

cn's People

Contributors

jaybrown avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

szp35

cn's Issues

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.