链接及key加密

This commit is contained in:
liyuhua
2023-11-23 15:11:15 +08:00
parent 9740cbdc12
commit 1e1e3482dc
13 changed files with 285 additions and 63 deletions

View File

@@ -10,6 +10,7 @@
23270C292B0E037300B9303B /* MessageConentAudioView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C272B0E037300B9303B /* MessageConentAudioView.m */; };
23270C2C2B0E041300B9303B /* MessageAudioCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C2B2B0E041300B9303B /* MessageAudioCenter.m */; };
23270C302B0E071B00B9303B /* MewPaymentAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23270C2F2B0E071B00B9303B /* MewPaymentAction.swift */; };
23270C342B0EFD9A00B9303B /* NewEncryptTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 23270C332B0EFD9A00B9303B /* NewEncryptTool.m */; };
233757562B0CB577001D0B7F /* MessagePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 233757262B0CB577001D0B7F /* MessagePresenter.m */; };
233757572B0CB577001D0B7F /* MessageMenuModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337572C2B0CB577001D0B7F /* MessageMenuModel.m */; };
233757582B0CB577001D0B7F /* ChatLimitModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2337572D2B0CB577001D0B7F /* ChatLimitModel.m */; };
@@ -200,6 +201,8 @@
23270C2B2B0E041300B9303B /* MessageAudioCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageAudioCenter.m; sourceTree = "<group>"; };
23270C2E2B0E071B00B9303B /* yinmeng-ios-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "yinmeng-ios-Bridging-Header.h"; sourceTree = "<group>"; };
23270C2F2B0E071B00B9303B /* MewPaymentAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MewPaymentAction.swift; sourceTree = "<group>"; };
23270C322B0EFD9A00B9303B /* NewEncryptTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NewEncryptTool.h; sourceTree = "<group>"; };
23270C332B0EFD9A00B9303B /* NewEncryptTool.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NewEncryptTool.m; sourceTree = "<group>"; };
233757262B0CB577001D0B7F /* MessagePresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessagePresenter.m; sourceTree = "<group>"; };
233757272B0CB577001D0B7F /* MessagePresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessagePresenter.h; sourceTree = "<group>"; };
233757292B0CB577001D0B7F /* MessageProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageProtocol.h; sourceTree = "<group>"; };
@@ -612,6 +615,15 @@
path = "yinmeng-ios/Base/MewIAP";
sourceTree = SOURCE_ROOT;
};
23270C312B0EFD2A00B9303B /* EncryptTool */ = {
isa = PBXGroup;
children = (
23270C322B0EFD9A00B9303B /* NewEncryptTool.h */,
23270C332B0EFD9A00B9303B /* NewEncryptTool.m */,
);
path = EncryptTool;
sourceTree = "<group>";
};
233757242B0CB577001D0B7F /* Message */ = {
isa = PBXGroup;
children = (
@@ -1004,6 +1016,7 @@
8C9C82702B0C695600A601BC /* Tool */ = {
isa = PBXGroup;
children = (
23270C312B0EFD2A00B9303B /* EncryptTool */,
8C9C82712B0C695600A601BC /* YYUtility */,
8C9C82782B0C695600A601BC /* UIImage */,
8C9C827B2B0C695600A601BC /* Safe */,
@@ -2354,6 +2367,7 @@
8C9C845B2B0C697A00A601BC /* Api+Main.m in Sources */,
8C9C846A2B0C697A00A601BC /* Api+MewHome.m in Sources */,
8C9C847A2B0C697A00A601BC /* MewLoginViewController.m in Sources */,
23270C342B0EFD9A00B9303B /* NewEncryptTool.m in Sources */,
8C9C844F2B0C697A00A601BC /* LoginFullInfoPresenter.m in Sources */,
8C9C82D22B0C695600A601BC /* YMIAPHelper.m in Sources */,
8C9C84A32B0D894100A601BC /* RoomFaceSendInfoModel.m in Sources */,

View File

@@ -6,7 +6,7 @@
//
#import "Api.h"
#import "NewEncryptTool.h"
@implementation Api
+ (void)makeRequest:(NSString *)route method:(HttpRequestHelperMethod)method completion:(HttpRequestHelperCompletion)completion, ... {
@@ -45,7 +45,8 @@
///
+ (void)getUserInfo:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
[self makeRequest:@"user/get" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"KEMxFkjgYfZuaj0tYsUeqQ=="];///user/get
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
}
///
@@ -53,7 +54,8 @@
/// @param transcationIdStr
+ (void)requestCheckTranscationIds:(HttpRequestHelperCompletion)complection
transcationIdStr:(NSString *)transcationIdStr {
[self makeRequest:@"verify/checkIOSChargeRecord" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__,transcationIdStr, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"AC1UrTdJJWq1b8dtUCnP4zFOik6EzK85rr1GEjLv2Kk="];///verify/checkIOSChargeRecord
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__,transcationIdStr, nil];
}
///
@@ -61,7 +63,8 @@
/// @param mobile
/// @param type XPEunm
+ (void)phoneSmsCode:(HttpRequestHelperCompletion)completion mobile:(NSString *)mobile type:(NSString *)type {
[self makeRequest:@"sms/getCode" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, mobile, type, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"2Hx71goXCYG6r1fVVkSHsA=="];///sms/getCode
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, mobile, type, nil];
}
///
@@ -69,7 +72,8 @@
/// @param userInfo
+ (void)completeUserInfo:(HttpRequestHelperCompletion)complection
userInfo:(NSDictionary *)userInfo {
[HttpRequestHelper request:@"user/v2/update" method:HttpRequestHelperMethodPOST params:userInfo completion:complection];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"6A7+MXSz6a7RbsOb9Ls+mA=="];///user/v2/update
[HttpRequestHelper request:getUrl method:HttpRequestHelperMethodPOST params:userInfo completion:complection];
}
@@ -80,6 +84,7 @@
+ (void)getUserWalletInfo:(HttpRequestHelperCompletion)complection
uid:(NSString *)uid
ticket:(NSString *)ticket {
[self makeRequest:@"purse/query" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, ticket,nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"7xFYk5dOEOCLb2Sfp0mwZw=="];//purse/query
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, ticket,nil];
}
@end

View File

@@ -0,0 +1,19 @@
//
// NewEncryptTool.h
// yinmeng-ios
//
// Created by duoban on 2023/11/23.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NewEncryptTool : NSObject
//MARK: AES加解密
+ (NSString *)MEW_aesEncrypt:(NSString *)sourceStr;
+ (NSString *)MEW_aesDecrypt:(NSString *)secretStr;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,151 @@
//
// NewEncryptTool.m
// yinmeng-ios
//
// Created by duoban on 2023/11/23.
//
#import "NewEncryptTool.h"
#import <CommonCrypto/CommonCrypto.h>
#import <CommonCrypto/CommonDigest.h>
#define MEW_GL_AES_KEY @"weidskfjsdskfws"
#define MEW_GL_AES_IV @"seffkssfsfsdfsd"
@implementation NewEncryptTool
//MARK: AES start
+ (NSString *)MEW_aesEncrypt:(NSString *)sourceStr {
if (!sourceStr) {
return nil;
}
//
char keyPtr[kCCKeySizeAES256 + 1];
bzero(keyPtr, sizeof(keyPtr));
[MEW_GL_AES_KEY getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding];
//
char ivPtr[kCCBlockSizeAES128 + 1];
bzero(ivPtr, sizeof(ivPtr));
[MEW_GL_AES_IV getCString:ivPtr maxLength:sizeof(ivPtr) encoding:NSUTF8StringEncoding];
NSData *sourceData = [sourceStr dataUsingEncoding:NSUTF8StringEncoding];
NSUInteger dataLength = [sourceData length];
size_t buffersize = dataLength + kCCBlockSizeAES128;
void *buffer = malloc(buffersize);
size_t numBytesEncrypted = 0;
/*
//CBC
kCCOptionPKCS7Padding
//ECB
kCCOptionPKCS7Padding | kCCOptionECBMode
*/
CCCryptorStatus cryptStatus = CCCrypt(kCCEncrypt,
kCCAlgorithmAES128,
kCCOptionPKCS7Padding,
keyPtr,
kCCBlockSizeAES128,
ivPtr,//ECBNULL
[sourceData bytes],
dataLength,
buffer,
buffersize,
&numBytesEncrypted);
if (cryptStatus == kCCSuccess) {
NSData *encryptData = [NSData dataWithBytesNoCopy:buffer length:numBytesEncrypted];
//base64
return [encryptData base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
//16
// NSMutableString *output = [NSMutableString stringWithCapacity:encryptData.length * 2];
// if (encryptData && encryptData.length > 0) {
// Byte *datas = (Byte*)[encryptData bytes];
// for(int i = 0; i < encryptData.length; i++){
// [output appendFormat:@"%02x", datas[i]];
// }
// }
// return output;
} else {
free(buffer);
return nil;
}
}
+ (NSString *)MEW_aesDecrypt:(NSString *)secretStr {
if (!secretStr) {
return nil;
}
// //base64
NSData *decodeData = [[NSData alloc] initWithBase64EncodedString:secretStr options:NSDataBase64DecodingIgnoreUnknownCharacters];
//16
// NSData *decodeData = [self convertHexStrToData:secretStr];
//
char keyPtr[kCCKeySizeAES128 + 1];
bzero(keyPtr, sizeof(keyPtr));
[MEW_GL_AES_KEY getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding];
//
char ivPtr[kCCBlockSizeAES128 + 1];
bzero(ivPtr, sizeof(ivPtr));
[MEW_GL_AES_IV getCString:ivPtr maxLength:sizeof(ivPtr) encoding:NSUTF8StringEncoding];
NSUInteger dataLength = [decodeData length];
size_t bufferSize = dataLength + kCCBlockSizeAES128;
void *buffer = malloc(bufferSize);
size_t numBytesDecrypted = 0;
/*
//CBC
kCCOptionPKCS7Padding
//ECB
kCCOptionPKCS7Padding | kCCOptionECBMode
*/
CCCryptorStatus cryptStatus = CCCrypt(kCCDecrypt,
kCCAlgorithmAES128,
kCCOptionPKCS7Padding,
keyPtr,
kCCBlockSizeAES128,
ivPtr,//ECBNULL
[decodeData bytes],
dataLength,
buffer,
bufferSize,
&numBytesDecrypted);
if (cryptStatus == kCCSuccess) {
NSData *data = [NSData dataWithBytesNoCopy:buffer length:numBytesDecrypted];
NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
return result;
} else {
free(buffer);
return nil;
}
}
// 16NSData
+ (NSData *)MEW_convertHexStrToData:(NSString *)str {
if (!str || [str length] == 0) {
return nil;
}
NSMutableData *hexData = [[NSMutableData alloc] initWithCapacity:20];
NSRange range;
if ([str length] % 2 == 0) {
range = NSMakeRange(0, 2);
} else {
range = NSMakeRange(0, 1);
}
for (NSInteger i = range.location; i < [str length]; i += 2) {
unsigned int anInt;
NSString *hexCharStr = [str substringWithRange:range];
NSScanner *scanner = [[NSScanner alloc] initWithString:hexCharStr];
[scanner scanHexInt:&anInt];
NSData *entity = [[NSData alloc] initWithBytes:&anInt length:1];
[hexData appendData:entity];
range.location += range.length;
range.length = 2;
}
return hexData;
}
@end

View File

@@ -6,7 +6,7 @@
//
#import "YMConstant.h"
#import "NewEncryptTool.h"
@implementation YMConstant
@@ -21,28 +21,28 @@ NSString * const KeyWithType(KeyType type) {
NSDictionary * dic = @{
///
@(YES):@{
@(KeyType_PasswordEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
@(KeyType_NTESQuickLoginBusinessId) : @"3a94ceb70b144963a03bf98cb55b812a",
@(KeyType_TRTC) : @"1400798783",
@(KeyType_NetEase) : @"5e76ec47632d86c30ce18eabfa332b6a",
@(keyType_YiDunBussinessId) : @"601545055434f31dc44a7a33b33a8cdf",
@(KeyType_APNSCer) : @"yinyouApnsRelease",
@(KeyType_PasswordEncode) : @"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb",///1ea53d260ecf11e7b56e00163e046a26
@(KeyType_NTESQuickLoginBusinessId) : @"AQyemQ+/HZ+nQRQ4DPatTW2tUk6GEe6JzMXlMYj7DJZNIy7OWwQtq9Gvf9SSiXHE",///3a94ceb70b144963a03bf98cb55b812a
@(KeyType_TRTC) : @"KuvNPAVFOJuCIn4wjVeOMw==",///1400798783
@(KeyType_NetEase) : @"7NBaCDlqfBflZ1RQ3KafcH6Nx0XMQ2gifSf2VGRR3fQIHUWnuBoteXTPoxHUD9Oo",///5e76ec47632d86c30ce18eabfa332b6a
@(keyType_YiDunBussinessId) : @"EhdbQun+WXkne5z3pctmR/3144MiHQbb+Dw1kIia3a+TcSiMNCCZgxUwTjE3XVDH",///601545055434f31dc44a7a33b33a8cdf
@(KeyType_APNSCer) : @"GtuBUKu9v+g/K9TKH7rVbh/9KXhCFsGFbj6YwErCZAM=",///yinyouApnsRelease
},
///
@(NO):@{
@(KeyType_PasswordEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
@(KeyType_NTESQuickLoginBusinessId) : @"3a94ceb70b144963a03bf98cb55b812a",
@(KeyType_TRTC) : @"1400798783",
@(KeyType_NetEase) : @"5d5a833a2d0ff1304a5d8bed53d2af5b",
@(keyType_YiDunBussinessId) : @"49478ae7a5491a13ce32e9b3e8127382",
@(KeyType_APNSCer) : @"yinyouApnsDebug",
@(KeyType_PasswordEncode) : @"BeKYtw9W3zMhFjuzb+vcnjdojaAyH9EGzCdIxstGcrq4NT2kD4vUPpFe9VZwRGHb",///1ea53d260ecf11e7b56e00163e046a26
@(KeyType_NTESQuickLoginBusinessId) : @"AQyemQ+/HZ+nQRQ4DPatTW2tUk6GEe6JzMXlMYj7DJZNIy7OWwQtq9Gvf9SSiXHE",///3a94ceb70b144963a03bf98cb55b812a
@(KeyType_TRTC) : @"KuvNPAVFOJuCIn4wjVeOMw==",///1400798783
@(KeyType_NetEase) : @"KF52dJ9ygkGloO4ICIAY401jc/d9YgjLKdVkJuK1jr1Oh4YSOHttbqdgg/6a884U",///5d5a833a2d0ff1304a5d8bed53d2af5b
@(keyType_YiDunBussinessId) : @"I1MpTgirOUjWzALwDanBHDBvHWv4p3Qx68cskj6NLP0m/2OChV+K/G1jPOZRlfDz",///49478ae7a5491a13ce32e9b3e8127382
@(KeyType_APNSCer) : @"WHMG2VqGBdhzSbLQVaTD5w==",///yinyouApnsDebug
}
};
NSDictionary *enviroDic = [dic objectForKey:@(isRelase)];
return [enviroDic objectForKey:@(type)];
return [NewEncryptTool MEW_aesDecrypt:[enviroDic objectForKey:@(type)]];
}
@end

View File

@@ -6,23 +6,26 @@
//
#import "Api+Main.h"
#import "NewEncryptTool.h"
@implementation Api (Main)
/// Ticket
+ (void)requestTicket:(HttpRequestHelperCompletion)completion access_token:(NSString *)accessToken issue_type:(NSString *)issueType {
[self makeRequest:@"oauth/ticket" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, accessToken, issueType, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"G0vRJk+lM7aIFJdrDs1Xhg=="];///oauth/ticket
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, accessToken, issueType, nil];
}
///
/// @param complection
+ (void)clientInitConfig:(HttpRequestHelperCompletion)complection {
[HttpRequestHelper request:@"client/init" method:HttpRequestHelperMethodGET params:[NSMutableDictionary dictionary] completion:complection];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"B0VaK5AAEVj2lGQmh7fdkg=="];///client/init
[HttpRequestHelper request:getUrl method:HttpRequestHelperMethodGET params:[NSMutableDictionary dictionary] completion:complection];
}
/// 30 线
+ (void)requestClientHeartBrat:(HttpRequestHelperCompletion)completion {
[self makeRequest:@"client/heartbeat" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"hq8XfxW9EwyMQW8i9Gu8SujFTd3xA+6qI6zbeP4xLnY="];///"client/heartbeat"
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, nil];
}

View File

@@ -6,24 +6,27 @@
//
#import "Api+MewHome.h"
#import "NewEncryptTool.h"
@implementation Api (MewHome)
/// Mew
+ (void)getMewHomeFriendListCompleted:(HttpRequestHelperCompletion)completed gender:(NSString *)gender {
[self makeRequest:@"voiceShow/listRandom" method:HttpRequestHelperMethodGET completion:completed, __FUNCTION__, gender, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"ZnqkAkDTTXWcnvwqETmxzC3fgpK+OuH3kRHkQFI0HyM="];///voiceShow/listRandom
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:completed, __FUNCTION__, gender, nil];
}
///
+ (void)getNewFriendListComplection:(HttpRequestHelperCompletion)complection gender:(NSString *)gender {
[self makeRequest:@"home/newFriend" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, gender, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"snLITcKwwnlRGbuT+0t3Gw=="];///home/newFriend
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, gender, nil];
}
/// token
/// @param completion
+ (void)qiniuUpLoadImage:(HttpRequestHelperCompletion)completion {
[self makeRequest:@"qiniu/upload/getUploadToken" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"V5gbqkWkuc4Fvzj9mYj/hBeoD5CULsPTsiK8Z8GieqY="];///qiniu/upload/getUploadToken
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil];
}

View File

@@ -6,7 +6,7 @@
//
#import "Api+Home.h"
#import "NewEncryptTool.h"
@implementation Api (Home)
///
@@ -16,14 +16,16 @@
/// @param pageNum
/// @param pageSize
+ (void)getRecommendListComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid tabId:(NSString *)tabId pageNum:(NSString *)pageNum pageSize:(NSString *)pageSize {
[self makeRequest:@"home/tab/mapV2" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, tabId, pageNum, pageSize, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"O27OsHzajhPM8UtfxngyAA=="];///home/tab/mapV2
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, tabId, pageNum, pageSize, nil];
}
///
/// @param completion
/// @param uid uid
+ (void)homeRecommendRoomListComplection:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
[self makeRequest:@"home/tab/homeV2" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"QFTxN/O9DfSc+M1EAx2zzw=="];///home/tab/homeV2
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
}
@end

View File

@@ -6,11 +6,12 @@
//
#import "Api+Login.h"
#import "NewEncryptTool.h"
@implementation Api (Login)
///
+ (void)phoneQuickLogin:(HttpRequestHelperCompletion)completion accessToken:(NSString *)accessToken token:(NSString *)token {
[self makeRequest:@"acc/oneclick/login" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, accessToken, token, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"5OuUEI/lxBioS84/A1+LB6USUuyY1yofu3VeNn4bGRA="];///acc/oneclick/login
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, accessToken, token, nil];
}
///
@@ -18,7 +19,8 @@
/// @param phone
/// @param code
+ (void)loginWithCode:(HttpRequestHelperCompletion)completion phone:(NSString *)phone code:(NSString *)code client_secret:(NSString *)client_secret version:(NSString *)version client_id:(NSString *)client_id grant_type:(NSString *)grant_type {
[self makeRequest:@"oauth/token" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,phone,code,client_secret,version, client_id, grant_type, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"QFgInRYQSkXdbIyvBsVUvA=="];////oauth/token
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,phone,code,client_secret,version, client_id, grant_type, nil];
}
///
@@ -26,7 +28,8 @@
/// @param phone
/// @param password
+ (void)loginWithPassword:(HttpRequestHelperCompletion)completion phone:(NSString *)phone password:(NSString *)password client_secret:(NSString *)client_secret version:(NSString *)version client_id:(NSString *)client_id grant_type:(NSString *)grant_type {
[self makeRequest:@"oauth/token" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,phone,password,client_secret,version, client_id, grant_type, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"QFgInRYQSkXdbIyvBsVUvA=="];///oauth/token
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,phone,password,client_secret,version, client_id, grant_type, nil];
}
///
@@ -35,7 +38,8 @@
/// @param newPwd
/// @param smsCode
+ (void)resetPasswordWithPhone:(HttpRequestHelperCompletion)completion phone:(NSString *)phone newPwd:(NSString *)newPwd smsCode:(NSString *)smsCode {
[self makeRequest:@"acc/pwd/reset" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, phone, newPwd, smsCode, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"ZstXKg9XrXuRUPW6jNgkzQ=="];///acc/pwd/reset
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, phone, newPwd, smsCode, nil];
}
@@ -46,13 +50,15 @@
/// @param access_token access_token
/// @param type
+ (void)loginWithThirdPart:(HttpRequestHelperCompletion)completion openid:(NSString *)openid unionid:(NSString *)unionid access_token:(NSString *)access_token type:(NSString *)type {
[self makeRequest:@"acc/third/login" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, openid, unionid, access_token, type, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"jenVNOO6MbwSC77wnPIMng=="];///acc/third/login
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, openid, unionid, access_token, type, nil];
}
///
/// @param completion
+ (void)randomNick:(HttpRequestHelperCompletion)completion {
[self makeRequest:@"random/nick/get" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"7oWMT+wxmM3FF/aCDKLrRw=="];////random/nick/get
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, nil];
}
///
@@ -64,7 +70,8 @@
phone:(NSString *)phone
code:(NSString *)code
ticket:(NSString *)ticket {
[self makeRequest:@"withDraw/phone" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, phone, code, ticket, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"l+R2IRWIqi9yPiDc6rg+jg=="];///withDraw/phone
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, phone, code, ticket, nil];
}
@end

View File

@@ -6,10 +6,11 @@
//
#import "Api+Message.h"
#import "NewEncryptTool.h"
@implementation Api (Message)
+ (void)getChatLimit:(HttpRequestHelperCompletion)complection receiverUid:(NSString *)receiverUid {
[self makeRequest:@"privateChat/limit" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, receiverUid,nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"ml84Zo9PhMJ69iyUKDccSccouVGFyLv2OiwzJUi0qGI="];///privateChat/limit
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, receiverUid,nil];
}

View File

@@ -6,7 +6,7 @@
//
#import "Api+Mine.h"
#import "NewEncryptTool.h"
@implementation Api (Mine)
///
@@ -16,14 +16,16 @@
/// @param pageSize
/// @param roomType 4
+ (void)requestMineCollectRoomList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize roomType:(NSString *)roomType {
[self makeRequest:@"fans/fansRoomList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,uid , page, pageSize, roomType, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"xbrIaF3tjG37mRyRC97ZrffhHg2YaksxPephr1wGtYI="];//fans/fansRoomList
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,uid , page, pageSize, roomType, nil];
}
/// 退
/// @param completion
/// @param access_token token
+ (void)logoutCurrentAccount:(HttpRequestHelperCompletion)completion access_token:(NSString *)access_token {
[self makeRequest:@"acc/logout" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, access_token, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"73cfDtRGGthZvJUN7DktoA=="];///acc/logout
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, access_token, nil];
}
@@ -33,7 +35,8 @@
/// @param page page
/// @param pageSize pagesize
+ (void)userDetailInfoCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize {
[self makeRequest:@"user/detail/get" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, page, pageSize, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"W7uzbHnGUU1RiDHmTvViGQ=="];///user/detail/get
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, page, pageSize, nil];
}
@@ -44,7 +47,8 @@
/// @param ticket ticket
/// @param type 1 2
+ (void)attentionCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid likedUid:(NSString *)likedUid ticket:(NSString *)ticket type:(NSString *)type {
[self makeRequest:@"fans/like" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, likedUid, ticket, type, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"atxkzRc+U9YS4UOIpECXlw=="];///fans/like
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, likedUid, ticket, type, nil];
}
///
@@ -52,7 +56,8 @@
/// @param uid uid
/// @param isLikeUid uid
+ (void)attentionStatusCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid isLikeUid:(NSString *)isLikeUid {
[self makeRequest:@"fans/islike" method:HttpRequestHelperMethodGET completion:completion,__FUNCTION__, uid, isLikeUid, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"2D8AkLpUg8cU9aQTxO+Mmw=="];///fans/islike
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:completion,__FUNCTION__, uid, isLikeUid, nil];
}
///
@@ -61,7 +66,8 @@
/// @param pageNo
/// @param pageSize
+ (void)getattentionListCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid pageNo:(NSString *)pageNo pageSize:(NSString *)pageSize {
[self makeRequest:@"fans/following" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, pageNo, pageSize, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"INF19c+8RN4ef4v8DIWwJQ=="];///fans/following
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, pageNo, pageSize, nil];
}
@@ -70,7 +76,8 @@
/// @param completion
/// @param channelType channel
+ (void)getRechargeList:(HttpRequestHelperCompletion)completion channelType:(NSString *)channelType {
[self makeRequest:@"chargeprod/list" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,channelType, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"tJGng+8YSnwgwk5S0i5New=="];////chargeprod/list
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,channelType, nil];
}
///
@@ -81,7 +88,8 @@
/// @param deviceInfo uuid
/// @param clientIp ip
+ (void)requestIAPRecharge:(HttpRequestHelperCompletion)completion chargeProdId:(NSString *)chargeProdId uid:(NSString *)uid ticket:(NSString *)ticket deviceInfo:(NSString *)deviceInfo clientIp:(NSString *)clientIp {
[self makeRequest:[NSString stringWithFormat:@"%@%@/%@%@",@"store",@"KitV2",@"place",@"Order"] method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,chargeProdId, uid, ticket, deviceInfo, clientIp, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"h38zFZd8K2D3KYstRcN3PH3b+txRVsiifBR3B6kGlU4="];//storeKitV/placeOrder
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,chargeProdId, uid, ticket, deviceInfo, clientIp, nil];
}
@@ -94,7 +102,8 @@
/// @param uid uid
/// @param ticket ticket
+ (void)checkReceipt:(HttpRequestHelperCompletion)completion receipt:(NSString *)receipt chooseEnv:(NSString *)chooseEnv chargeRecordId:(NSString *)chargeRecordId transcationId:(NSString *)transcationId uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:@"verify/setiap" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,receipt, chooseEnv, chargeRecordId, transcationId, uid, ticket, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"/sdsv2QZR4mbqOhGOocSTQ=="];////verify/setiap
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,receipt, chooseEnv, chargeRecordId, transcationId, uid, ticket, nil];
}
///
/// @param completion
@@ -104,7 +113,7 @@
/// @param uid uid
/// @param ticket ticket
+ (void)checkReceipt:(HttpRequestHelperCompletion)completion chooseEnv:(NSString *)chooseEnv chargeRecordId:(NSString *)chargeRecordId transcationId:(NSString *)transcationId uid:(NSString *)uid ticket:(NSString *)ticket {
[self makeRequest:[NSString stringWithFormat:@"%@%@/%@%@",@"store",@"KitV2",@"verify",@"Order"] method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, chooseEnv, chargeRecordId, transcationId, uid, ticket, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"10iACYRNJ/Q7R019Q4DRNFPf0nODacTzggh6x9bvmOw="];//storeKitV2/verifyOrder
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, chooseEnv, chargeRecordId, transcationId, uid, ticket, nil];
}
@end

View File

@@ -6,7 +6,7 @@
//
#import "Api+Gift.h"
#import "NewEncryptTool.h"
@implementation Api (Gift)
///
/// @param complection
@@ -29,7 +29,8 @@
roomUid:(NSString *)roomUid
msg:(NSString *)msg
uid:(NSString *)uid {
NSString *method = @"gift/sendV4";
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"gIV0xamx+afcRMN4yGb5jw=="];///gift/sendV4
NSString *method = getUrl;
[self makeRequest:method method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, targetUids, giftNum, sendType, giftId, giftSource, giftType, roomUid, msg, uid, nil];
}
@end

View File

@@ -6,7 +6,7 @@
//
#import "Api+Room.h"
#import "NewEncryptTool.h"
@implementation Api (Room)
///
@@ -14,7 +14,8 @@
/// @param uid uid
/// @param intoUid Uid
+ (void)getRoomInfo:(HttpRequestHelperCompletion)complection uid:(NSString *)uid intoUid:(NSString *)intoUid {
[self makeRequest:@"room/get" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, intoUid, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"gs8/IEqGWXCD7Cn4Hs11dw=="];///room/get
[self makeRequest:getUrl method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, intoUid, nil];
}
///
@@ -36,7 +37,8 @@
uid:(NSString *)uid
ticket:(NSString *)ticket
mgId:(NSString *)mgId {
[Api makeRequest:@"room/open" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, title, @(type), roomPwd, roomDesc, backPic, uid, ticket, mgId,nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"/Q7ygAZSSdH/vm0uhYbwIw=="];///room/open
[Api makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, title, @(type), roomPwd, roomDesc, backPic, uid, ticket, mgId,nil];
}
@@ -47,7 +49,8 @@
/// @param position
/// @param ticket ticket
+ (void)roomMicUpMic:(HttpRequestHelperCompletion)complection micUid:(NSString *)micUid roomId:(NSString *)roomId position:(NSString *)position ticket:(NSString *)ticket {
[self makeRequest:@"room/mic/upmic" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, micUid, roomId, position, ticket, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"8gpgcXMk36xfvm6d+muZng=="];///room/mic/upmic
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, micUid, roomId, position, ticket, nil];
}
///
@@ -57,7 +60,8 @@
/// @param position
/// @param ticket ticket
+ (void)roomMicDownMic:(HttpRequestHelperCompletion)complection micUid:(NSString *)micUid roomId:(NSString *)roomId position:(NSString *)position ticket:(NSString *)ticket {
[Api makeRequest:@"room/mic/downmic" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, micUid, roomId, position, ticket, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"yLlyaDpUfo8seQvUf2xVE1pDQw0kPWhe5imJar+ZYGs="];//room/mic/downmic
[Api makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, micUid, roomId, position, ticket, nil];
}
///
@@ -67,7 +71,8 @@
/// @param type 1 2 3
/// @param roomUids uid,
+ (void)collectRoom:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid uid:(NSString *)uid type:(NSString *)type roomUids:(NSString *)roomUids {
[Api makeRequest:@"fans/fansRoom" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, roomUid, uid, type, roomUids, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"GQiHXUlHz3kGtxBxaDpYOg=="];///fans/fansRoom
[Api makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, roomUid, uid, type, roomUids, nil];
}
@@ -77,7 +82,8 @@
/// @param roomUid uid
/// @param ticket ticket
+ (void)requestReportUserInterRoom:(HttpRequestHelperCompletion)completion uid:(NSString *)uid roomUid:(NSString *)roomUid ticket:(NSString *)ticket {
[self makeRequest:@"userroom/inV2" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, roomUid, ticket, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"+RPS7HavWT0Wo413/I2TLA=="];///userroom/inV2
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, roomUid, ticket, nil];
}
@@ -87,7 +93,8 @@
/// @param roomUid uid
/// @param ticket ticket
+ (void)requestReportUserOutRoom:(HttpRequestHelperCompletion)completion uid:(NSString *)uid roomUid:(NSString *)roomUid ticket:(NSString *)ticket {
[self makeRequest:@"userroom/outV2" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, roomUid, ticket, nil];
NSString *getUrl = [NewEncryptTool MEW_aesDecrypt:@"eGme6ANFUqQGdpX/DtfRrg=="];///userroom/outV2
[self makeRequest:getUrl method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, roomUid, ticket, nil];
}
@end