I am using MD5 algorithm for sync with server where I want to send data using MD5 algorithm. I wrote following code-
NSString *string = @"ABC";
unsigned char *inStrg = (unsigned char*)[[string dataUsingEncoding:NSASCIIStringEncoding] bytes];
unsigned long lngth = [string length];
unsigned char result[MD5_DIGEST_LENGTH];
NSMutableString *outStrg = [NSMutableString string];
MD5(inStrg, lngth, result);
unsigned int i;
for (i = 0; i < MD5_DIGEST_LENGTH; i++)
{
[outStrg appendFormat:@"%02x", result[i]];
}
md5TextField.text = outStrg;
For decryption at server end I need its key through which MD5 text has been generated. What will be its key? Thanks in advance...