#include <openssl/md5.h>
void mMD5(unsigned char * packet, int size) {
unsigned char* res;
MD5((unsigned char*)&packet, size, (unsigned char*)&res);
for(int i=0; i<MD5_DIGEST_LENGTH; i++) {
printf("%02x", res[i]);
}
}
I get the error: undefined reference to MD5
Can anyone help me?
You need to link to the matching library. You should have a file called md5.lib
or md5.a
or something like that (depending on your OS), and add it to your linker command line (again, depending on your environment).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With