An open API service indexing awesome lists of open source software.

https://github.com/michelerenzullo/light-md5

simple md5 alghorithm in c++ with static libs
https://github.com/michelerenzullo/light-md5

libs md5 md5-hash md5sum static

Last synced: about 2 months ago
JSON representation

simple md5 alghorithm in c++ with static libs

Awesome Lists containing this project

README

        

# Light-MD5
A very fast, simple, and optimized md5 alghorithm in c++ with static libs.
[Original code](https://gist.github.com/creationix/4710780)

**Do you like this project? Support it by donating**

- ![Paypal](https://raw.githubusercontent.com/reek/anti-adblock-killer/gh-pages/images/paypal.png) Paypal: [Donate](https://www.paypal.com/donate?hosted_button_id=XQ8QUEME5JZMN) or [paypal.me/michelerenzullo](https://paypal.me/michelerenzullo)
- ![btc](https://raw.githubusercontent.com/reek/anti-adblock-killer/gh-pages/images/bitcoin.png) Bitcoin: 1K9RF3s4aocmaRbh2Zu2FuHjrcg5BNeDxU

## FEATURES:
* input: char[], const char *, uint8_t[], uint8_t *, or string, see examples inside intmain.cpp
* adapt automatically to input with template and c++17 constexpr
* output: string md5

## USAGE:
See intmain.cpp for further examples
```Shell
std::string test = "hello";
std::string test_md5 = md5(test,test.length());
```

## COMPILE:
1) You can include the header, insert into your project lightmd5.cpp and compile together(see intmain.cpp)

```Shell
$ g++ -std=c++17 intmain.cpp lightmd5.cpp -o lightmd5.exe -Os -s
```

2) Or you can include the header and use static libs: you have to copy "a" files inside lib folder of your compiler and add option "-llightmd5" (or "-llightmd5_32")

```Shell
$ g++ -std=c++17 intmain.cpp -llightmd5(or -llightmd5_32 -m32) -o lightmd5.exe -Os -s
```

## NOTE:
If you can't compile with -std=c++17, don't include header and inside you cpp source define only the main function:
```Shell
std::string md5_process(uint8_t* , size_t);
```
See intmain.cpp examples to call md5_process(...)