ObjCtoCPlusPlus.mm 645 B

1234567891011121314151617181920212223
  1. #import "ObjCtoCPlusPlus.h"
  2. #import "IOSDataCollect.h"
  3. @implementation Performance_ObjCtoCPlusPlus
  4. + (NSData *)getSystemInfoUnAesEncode
  5. {
  6. char *result = (char *) malloc(sizeof(char) * 344);
  7. int length = 0;
  8. CTP_GetSystemInfoUnAesEncode(result, length);
  9. // CTP_GetSystemInfo(result, length);
  10. // for (int i = 0; i < length; i++){
  11. // printf("%u , ", (unsigned char)result[i]);
  12. // }
  13. // NSString *str = [[NSString alloc] initWithCString:result encoding:NSASCIIStringEncoding];
  14. // NSData *data = [str dataUsingEncoding:NSUTF8StringEncoding];
  15. return [NSData dataWithBytes:result length:length];
  16. }
  17. @end