NSString 转换成NSData 对象
NSData *data = [@"testdata" dataUsingEncoding:NSUTF8StringEncoding];
NSData 转换成NSString对象
NSString *str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; ```
***
#NSData 转换成char*
```NSData *data;
char *testData = [data bytes];```
***
#char* 转换成NSData对象
```byte *testData = malloc(sizeof(byte)*16);
NSData *content=[NSData dataWithBytes:testData length:16];```