I\'m trying to compare two UIImages from the file system to see if they are the same. Obviously, I can\'t use NSObject\'s hash method, since this returns a hash of the objec
more elegant code below
+(NSString *)MD5HexDigest:(NSData *)input { unsigned char result[CC_MD5_DIGEST_LENGTH]; CC_MD5(input.bytes, (unsigned int)input.length, result); NSMutableString *ret = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH*2]; for (int i = 0; i