{"id":21108106,"url":"https://github.com/jaybrown/cn","last_synced_at":"2025-07-16T01:41:03.459Z","repository":{"id":134386788,"uuid":"82175644","full_name":"JayBrown/cn","owner":"JayBrown","description":"Apple's open source command line interface to CommonNumerics routines (CRC-8/16/32/64, Base16/32/64)","archived":false,"fork":false,"pushed_at":"2017-02-16T15:50:10.000Z","size":33,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T09:30:49.330Z","etag":null,"topics":["adler-32","algorithm","base16","base32","base64","castagnoli","checksum","cli","commoncrypto","commonnumerics","crc","crc-16","crc-32","crc-32c","crc-8","fletcher","hash","hashing","macos","osx"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JayBrown.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-16T11:54:54.000Z","updated_at":"2023-08-21T22:36:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"30d51e66-744f-41a0-ac17-d83132cc298f","html_url":"https://github.com/JayBrown/cn","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/JayBrown/cn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayBrown%2Fcn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayBrown%2Fcn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayBrown%2Fcn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayBrown%2Fcn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayBrown","download_url":"https://codeload.github.com/JayBrown/cn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayBrown%2Fcn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263743182,"owners_count":23504613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adler-32","algorithm","base16","base32","base64","castagnoli","checksum","cli","commoncrypto","commonnumerics","crc","crc-16","crc-32","crc-32c","crc-8","fletcher","hash","hashing","macos","osx"],"created_at":"2024-11-20T00:45:03.596Z","updated_at":"2025-07-05T12:36:44.045Z","avatar_url":"https://github.com/JayBrown.png","language":"C","readme":"The **cn** command line interface to CommonNumerics routines has been published by Apple as part of their **[Open Source](https://opensource.apple.com)** project.\n\nIt belongs to the **[CommonCrypto library](https://opensource.apple.com/source/CommonCrypto/)**, but it has not been built/installed into macOS.\n\nYou can install **cn** using **[Homebrew](https://brew.sh)** (recommended) with `brew tap JayBrown/cn \u0026\u0026 brew install cn` ([tap repo with formula](https://github.com/JayBrown/homebrew-cn)), or you can **manually make/build** with `make clean` and `make cn`.\n\n## Functionality (man page)\n```\ncn(1)                     BSD General Commands Manual                    cn(1)\n\nNAME\n     cn -- Command line interface to CommonNumerics routines.\n\nSYNOPSIS\n     cn [-p prompt] [command] [command_options] [command_args]\n\nDESCRIPTION\n     A simple command line utility allowing you to perform CRC and Base Encode/Decode with the Common Numerics functions.\n\n     cn has the following standard options for all sub-commands:\n\n     -h            Show help information.\n\n     -a            Use the specified algorithm.  The CRC, Encode, and Decode commands have various algorithms that can be used\n                   on data provided to them.\n\n     -s -\u003cstring\u003e  Performs the operation on the specified string value.\n\n     -v            Function in Verbose mode.\n\nCN COMMAND SUMMARY\n     cn currently only provides functions for two activities: CRC calculation and Base Encoding and Decoding (base16, base32,\n     base64).\n\n     Here are brief descriptions of all the cn commands:\n\n     crc            Perform a CRC on the data provided either as a string or on stdin.\n\n                    Algorithms\n                    10 - kCN_CRC_8\n                    11 - kCN_CRC_8_ICODE\n                    12 - kCN_CRC_8_ITU\n                    13 - kCN_CRC_8_ROHC\n                    14 - kCN_CRC_8_WCDMA\n                    20 - kCN_CRC_16\n                    21 - kCN_CRC_16_CCITT_TRUE\n                    22 - kCN_CRC_16_CCITT_FALSE\n                    23 - kCN_CRC_16_USB\n                    24 - kCN_CRC_16_XMODEM\n                    25 - kCN_CRC_16_DECT_R\n                    26 - kCN_CRC_16_DECT_X\n                    27 - kCN_CRC_16_ICODE\n                    28 - kCN_CRC_16_VERIFONE\n                    29 - kCN_CRC_16_A\n                    30 - kCN_CRC_16_B\n                    31 - kCN_CRC_16_Fletcher\n                    40 - kCN_CRC_32_Adler\n                    41 - kCN_CRC_32\n                    42 - kCN_CRC_32_CASTAGNOLI\n                    43 - kCN_CRC_32_BZIP2\n                    44 - kCN_CRC_32_MPEG_2\n                    45 - kCN_CRC_32_POSIX\n                    46 - kCN_CRC_32_XFER\n                    60 - kCN_CRC_64_ECMA_182\n\n     Encode|Decode  Encode or Decode data provided either as a string or on stdin using one of the algorithms specified below.\n\n                    Algorithms\n                    1 - kCNEncodingBase64\n                    2 - kCNEncodingBase32\n                    3 - kCNEncodingBase32Recovery\n                    4 - kCNEncodingBase32HEX\n                    5 - kCNEncodingBase16\n\nENVIRONMENT\n     CN_READ_SIZE  The \"read size\" to use when processing incoming data.\n\n     CN_WIDTH      The number of columns in which to output data when performing a base encoding.  The default is 64 columns.\n\nHISTORY\n     cn was introduced in Mac OS X version 10.9 and iOS version 7.0.\n\nDarwin                         February 16, 2017                        Darwin\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaybrown%2Fcn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaybrown%2Fcn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaybrown%2Fcn/lists"}