I would like to hash a simple string using MD5 in Xcode c++. I searched a lot but I couldn't find a tutorial. I have to #import <CommonCrypto/CommonDigest.h>. Is that all? How can I call MD5 after that?
I have found this code but it gives me an error. How will I get my hashed value is it updated in the string variable?
 unsigned char digest[16];
 const char* string = "Hello World";
 struct MD5Context context;     **(error: variable has incomplete type
 MD5Init(&context);
 MD5Update(&context, string, strlen(string));
 MD5Final(digest, &context);
I'm just using a simple command line application no headers inside just the basic main.cpp. I really appreciate any help!!!!
 
     
    