#import "ObjCtoCPlusPlus.h" #import "IOSDataCollect.h" @implementation Performance_ObjCtoCPlusPlus + (NSData *)getSystemInfoUnAesEncode { char *result = (char *) malloc(sizeof(char) * 344); int length = 0; CTP_GetSystemInfoUnAesEncode(result, length); // CTP_GetSystemInfo(result, length); // for (int i = 0; i < length; i++){ // printf("%u , ", (unsigned char)result[i]); // } // NSString *str = [[NSString alloc] initWithCString:result encoding:NSASCIIStringEncoding]; // NSData *data = [str dataUsingEncoding:NSUTF8StringEncoding]; return [NSData dataWithBytes:result length:length]; } @end