How do you convert an unsigned char array to an NSData in objective c?
This is what I am trying to do, but it doesn't work. Buffer is my unsigned char array.
NSData *data = [NSData dataWithBytes:message length:length];
How do you convert an unsigned char array to an NSData in objective c?
This is what I am trying to do, but it doesn't work. Buffer is my unsigned char array.
NSData *data = [NSData dataWithBytes:message length:length];
You can just use this NSData class method
Something like
You can then get the array back like this (if you know that it is the right data type)