user1553381
user1553381

Reputation: 415

decrypt md5 iphone

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

Answers (2)

pre
pre

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

rckoenes
rckoenes

Reputation: 69459

You can't decrypt an MD5 HASH, it is a oneway encryption.

Upvotes: 7

Related Questions