0

Structure

In the source folder, there's the test.cpp

In the Header Files folder, there's the test.h

I'm trying to implement md5 hash function on a char array unsigned char dat[39] that contain both hex and char

referencing the example in How to get the MD5 hash of a file in C++?

As I cannot include <openssl/md5.h>, hence I manually add a md5.h from

www.zedwood.com/article/cpp-md5-function

to the Header Files folder

Then in the test.h file, I have added the function

oid print_md5_sum(unsigned char* md) {
    int i;
    for(i=0; i <39; i++) {
        printf("%02x",md[i]);
    }

After that, in the test.cpp file, I try to implement the md5 function

print_md5_sum(dat);

The project can compile, but the md5 function cannot work. Any insight would be greatly appreciated.

epiphany
  • 756
  • 1
  • 11
  • 29

0 Answers0