Reputation: 415
I'm using the following code to encrypt a string using md5
const char* str = [@"123456" UTF8String];
unsigned char result[CC_MD5_DIGEST_LENGTH];
CC_MD5(str, strlen(str), result);
NSMutableString *ret = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH*2];
for(int i = 0; i<CC_MD5_DIGEST_LENGTH; i++) {
[ret appendFormat:@"%02x",result[i]];
}
NSLog(@"%@", ret);
now I want a source code to decrypt the coded string, Any Help?
Upvotes: 0
Views: 1848
Reputation: 3506
MD5 is not an Encryption. It is a hash function. Finding the original value from a hash function is in general not possible.
Upvotes: 0