GithubHelp home page GithubHelp logo

candymi / tc Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 91 KB

A suitable for C/C++ encryption and decryption library.

License: BSD 3-Clause "New" or "Revised" License

CMake 4.14% C 90.13% C++ 5.73%
crc32 hex hmac md5 rc4 url c cmake pbkdf2 x86

tc's Introduction

TinyCrypto

TinyCrypto —— 一个适用于CC++的加密、解密库.

Features

  • 支持的操作系统 (Win/BSD/Linux/MacOS等)

  • 无需外部库依赖, 无平台与硬件依赖

  • 功能小巧且丰富, 方便自行定制环境

  • 接口易用性好, 无门槛即可上手

  • 可读性好、可维护性高、重复构建成本低

Note: 经过一些平台的不完全测试后, 在使用CMAKERelease模式构建后大小约为60KB ~ 80KB.

Usage

推荐使用者通过以下2种方式获取使用方法:

  1. 阅读inc文件夹下的相关源码头文件.

  2. 阅读test文件夹下的测试用例文件.

Install

  1. 构建环境 cd tc && cmake -B build -DENABLE_TEST=1.

  2. 编译 cmake --build build --config Release.

  3. cd build 运行 make installninja install 或其他安装命令.

1. Folder

在使用默认参数安装后, 目录格式如下所示:

├── include
│   └── tc
│       ├── ...
│       └── tc.h
├── lib
│   ├── libtccrypto.a
│   └── libtccrypto.so

2. path

使用CMAKE的时候如果不出意外的话, 最终的安装目录结构应该会如上所示. 然而您可以通过定义CMAKE_INSTALL_PREFIX宏来改变安装目录.(一般是: C:\Program files(x86)/usr/local)

Test Case

如果您想构建出测试用例, 那么使用CMAKE定义ENABLE_TEST宏为1即可.

Contribution

如果您喜欢它并且想为它贡献部分代码, 请保证您遵循以下的代码贡献规范:

If you like it and want to contribute some code to it, please follow these code contribution rules:

  • 请保证您以熟读TC相关源码实现. 并且愿意以TC相同规范的语法形式编写代码. (Please ensure that you are familiar with the TC related source code implementation. And willing to write code in the same canonical syntax as TC)

  • 由于您的代码将被冠以TC的前缀, 所以希望您的代码像其它算法实现一样可以兼容之前提到的平台. (Since your code will be prefixed with TC, expect your code to be as compatible with the aforementioned platforms as any other algorithmic implementation.)

  • 尽可能的复用TC已经实现的算法与接口, 编写的算法也尽可能让其它接口使用. (As far as possible to reuse the TC algorithm and interface has been implemented, the algorithm is written as far as possible to let other interfaces use.)

  • TC不依赖非标准库, 希望您贡献的代码也同样遵守. (TC does not rely on non-standard libraries, and we expect your code contributions to do the same)

  • 为了保证贡献到TC的代码质量, 请保证您的贡献至少拥有测试用例. (To ensure the quality of the code you contribute to the TC, make sure your contribution has at least test cases.)

License

BSD 3-Clause "New" or "Revised" License.

tc's People

Contributors

candymi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.