tags:

views:

60

answers:

1

Dear all, m new to iphone development,i m havin querry regardin MD5 code generation,my page is having 4 fields,like user name ,password.i need password fields MD5 code generation,my MD5 code conversion code is perfact,there is no error,but when i run the application .,it crashes,i exactly dnt know,how to convert my password field code conversion, if nyone help me out,code would be appreiciated

Thank you in advance

+1  A: 

I've used this in the past. You might find it helpful.

- (NSString *)stringWithMD5Hash:(NSString *)inStr {
    const char *cStr = [inStr UTF8String];
    unsigned char result[CC_MD5_DIGEST_LENGTH];
    CC_MD5( cStr, strlen(cStr), result );
    return [NSString stringWithFormat: @"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
        result[0], result[1], result[2], result[3], result[4], result[5], result[6], result[7],
        result[8], result[9], result[10], result[11], result[12], result[13], result[14], result[15] ];
}

This requires importing CommonCrypto/CommonDigest.h.

warrenm
Thank you So much..it works
talktobijju
Thank u warrenm
talktobijju
plz accept my questions plz coz whenever i ask any question regarding iPhone this msz appear on the screen "Sorry, we are no longer accepting questions from this account. "
talktobijju