Checksums are the most effective way to deter "noob" crackers. Anyone who knows some assembly can easily patch this, but its better than nothing.
Here's a function that returns the MD5 checksum of the given data.
Code:
#import CommonCrypto/CommonDigest.h
// this site fails with regards to disallowing < > in CODE blocks
NSString * data_getMD5(NSData *data) {
if (data == nil)
return nil;
const void * bytes = [data bytes];
int len = [data length];
unsigned char digest[CC_MD5_DIGEST_LENGTH];
CC_MD5_CTX c;
CC_MD5_Init(&c);
CC_MD5_Update(&c, bytes, len);
CC_MD5_Final(digest, &c);
return [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
digest[0], digest[1], digest[2], digest[3],
digest[4], digest[5], digest[6], digest[7],
digest[8], digest[9], digest[10], digest[11],
digest[12], digest[13], digest[14], digest[15] ];
}
Pass an NSData object holding the bytes of the info.plist.
Also, you can easily adapt it to do SHA1 instead.