I have a NSdata (License_Data <0d2b3931 39323433 37363637 36360c79 70617963 6173682d 50445301 0010322d 22772a17 24599e96 88be9991 b2410106>) like this
When i Convert this to char after this 00 ,It is not taking any value
0010322d
Char*c=[Lincense_Data bytes];
Is thr any method other than this which take even Zero also ,Anyone Please Help???
try this
unsigned char *bytePtr = (unsigned char *)[data bytes];
also see this answer..
how to convert NSData to char array containing hexa values
For Objective-C++, This is how I convert the NSData to char *
NSData *data = [...]; // This is your data
if (data) {
const void *_Nullable rawData = [data bytes];
char *src = (char *)rawData;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With