1
2
3
4
5
6
7
8
9
	NSData *receivedData = // Something from PHP server

	NSString *key = @"0123456789ABCDEF";
	CCOptions padding = kCCOptionPKCS7Padding;

	NSString *receivedString = [[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding];

	StringEncryption *crypto = [[[StringEncryption alloc] init] autorelease];
	NSData *decryptedData = [crypto decrypt:receivedData key:[key dataUsingEncoding:NSUTF8StringEncoding] padding:&padding];