- (NSString *)getHEX:(NSData *)data
{
const unsigned char *dataBytes = [data bytes];
NSMutableString *ret = [NSMutableString stringWithCapacity:[data length] * 2];
for (int i=0; i<[data length]; ++i)
[ret appendFormat:@"%02X", (NSUInteger)dataBytes[i]];
return ret;
}
沒有留言:
張貼留言