Code Monkey home page Code Monkey logo

simple-crypto's Introduction

simple-crypto

Simple C lib of the MD5 & TEA algorithm

Performance

Benchmark a 3.5MB file comparing with md5 command in MacOS Mojave by running three times time command then calculating their average.

# system command: total 22ms
real    0m0.015s
user    0m0.012s
sys     0m0.005s

# our md5 command: total 39ms
# build by
gcc md5.c -o md5 -O3 -DTEST_SIMPLE_CRYPTO

real    0m0.021s
user    0m0.013s
sys     0m0.005s

Our version is 17ms slower than what system does.

Benchmark a 481.7MB file comparing with md5 command in MacOS Mojave by running three times time command then calculating their average.

# system command: total 2079ms
real    0m0.980s
user    0m0.964s
sys     0m0.135s

# our md5 command: total 2499ms
# build by
gcc md5.c -o md5 -O3 -DTEST_SIMPLE_CRYPTO

real    0m1.253s
user    0m1.003s
sys     0m0.243s

Our version is 400ms slower than what system does.

Install

git clone https://github.com/fumiama/simple-crypto.git
cd simple-crypto
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE:STRING=Release ..
cmake --build . --config Release --target all --
cmake --install .

Usage

  1. Include simplecrypto.h in your c program.
#include <simplecrypto.h>
  1. Call functions.

see all functions in simplecrypto.h

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.