51 lines
1.5 KiB
Objective-C
Executable File
51 lines
1.5 KiB
Objective-C
Executable File
//
|
|
// HttpManager.h
|
|
// myhome
|
|
//
|
|
// Created by hkh on 16/11/6.
|
|
//
|
|
#import <Foundation/Foundation.h>
|
|
#import "sysinfo.h"
|
|
#include <net/if.h>
|
|
#include <net/if_dl.h>
|
|
#include <sys/socket.h> // Per msqr
|
|
#include <sys/sysctl.h>
|
|
#import <ifaddrs.h>
|
|
#import <arpa/inet.h>
|
|
#import <CommonCrypto/CommonDigest.h>
|
|
#import <CommonCrypto/CommonCryptor.h>
|
|
#import "AppDelegate.h"
|
|
#import "BaseNavigationController.h"
|
|
|
|
#ifndef Talk_Pub_h
|
|
#define Talk_Pub_h
|
|
|
|
|
|
|
|
#endif
|
|
|
|
@interface Pub: NSObject
|
|
+ (AppDelegate *)getApp;
|
|
+ (sysInfo *)getSysInfo;
|
|
+ (NSString *)MD5:(NSString *)input;
|
|
+ (NSString *)md5_:(NSString *)input;
|
|
+ (NSDictionary *)DictionaryWithJsonString:(NSString *)jsonString;
|
|
+ (BaseNavigationController *)getNav;
|
|
+ (void)addHead:(NSString *)head toByte:(Byte *)bb;
|
|
+ (void)addEquid:(NSString *)equId toByte:(Byte *)bb at:(int)pos;
|
|
+ (int)getBBlen:(Byte *)bb Len:(int)len;
|
|
+ (int)addGKB:(NSString *)equId toByte:(Byte *)bb at:(int)pos;
|
|
+ (void)addIp:(NSString *)ip toByte:(Byte *)bb at:(int)pos;
|
|
+ (void)addMac:(NSString *)mac toByte:(Byte *)bb at:(int)pos;
|
|
+ (void)addInt:(int)port toByte:(Byte *)bb at:(int)pos;
|
|
+ (void)addShort:(int)port toByte:(Byte *)bb at:(int)pos;
|
|
+ (short)getShortFromByte:(Byte *)bb at:(int)pos;
|
|
+ (int)Ox:(NSString *)v;
|
|
+ (NSString *)getLocalIP;
|
|
+ (NSString *)getMac;
|
|
+ (NSString *)getEquidFrombb:(Byte *)bb at:(int)pos;
|
|
+ (NSString *)NSdata2String:(NSData *)data;
|
|
+ (NSData *)AES128_Encrypt:(NSString *)key encryptData:(NSData *)data;
|
|
+ (NSData *)AES128_Decrypt:(NSString *)key encryptData:(NSData *)data;
|
|
@end
|