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
- Host: GitHub
- URL: https://github.com/michelerenzullo/light-md5
- Owner: michelerenzullo
- Created: 2021-02-06T02:04:39.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-02T16:05:13.000Z (almost 3 years ago)
- Last Synced: 2025-02-12T09:56:52.228Z (4 months ago)
- Topics: libs, md5, md5-hash, md5sum, static
- Language: C++
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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: [Donate](https://www.paypal.com/donate?hosted_button_id=XQ8QUEME5JZMN) or [paypal.me/michelerenzullo](https://paypal.me/michelerenzullo)
-  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(...)