Skip to content

michelerenzullo/Light-MD5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Light-MD5

A very fast, simple, and optimized md5 alghorithm in c++ with static libs.
Original code

Do you like this project? Support it by donating

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

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)
$ g++ -std=c++17 intmain.cpp lightmd5.cpp -o lightmd5.exe -Os -s
  1. 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")
$ 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:

std::string md5_process(uint8_t* , size_t);

See intmain.cpp examples to call md5_process(...)