developer
2023-05-20 e12c7b4c22df631ebdcd16b2f98fbef8f738f92f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
//
// OpenSecurityGuardSDK version 2.1.0
//
 
#import <Foundation/Foundation.h>
 
/**
 *  各compoent的compoentid,在获取component对象时传入
 */
typedef enum {
    /**
     *  签名component
     */
    OpenSecureSignatureComponentID,
    /**
     *  动态存储component
     */
    OpenDynamicDataStoreComponentID,
    /**
     *  静态存储component
     */
    OpenStaticDataStoreComponentID,
    /**
     *  初始化component
     */
    OpenInitComponentID,
    /**
     *  静态加解密component
     */
    OpenStaticDataEncryptCompnentID,
    /**
     *  data collection compnent
     */
    OpenDataCollectionCompnentID,
    /**
     *  dynamic data encrypt componentID
     */
    OpenDynamicDataEncryptComponentID,
    /**
     *  StaticKeyEncrypt componentID
     */
    OpenStaticKeyEncryptComponentID,
    /**
     *  UMID componentID
     */
    OpenUMIDComponentID,
    /**
     *  OpenSDK componentID
     */
    OpenOpenSDKComponentID,
    /**
     *  AtlasEncrypt ComponentID
     */
    OpenAtlasEncryptComponentID,
    /** 
     *  SimulatorDetect ComponentID
     */
    OpenSimulatorDetectComponentID,
    /**
     *  NoCpatcha ComponentID
     */
    OpenNoCaptchaComponentID,
    /**
     *  SecurityBody ComponentID
     */
    OpenSecurityBodyComponentID,
    /**
     *  无效component
     */
    OpenInvalidComponentID
    
} OpenSecurityGuardComponentID;
 
 
 
/**
 *  签名接口,详细定义见:IOpenSecureSignatureComponent.h
 */
@protocol IOpenSecureSignatureComponent;
 
/**
 *  动态数据存储接口,详细定义见:IOpenDynamicDataStoreComponent.h
 */
@protocol IOpenDynamicDataStoreComponent;
 
/**
 *  静态数据存储接口,详细定义见:IOpenStaticDataStoreComponent.h
 */
@protocol IOpenStaticDataStoreComponent;
 
/**
 *  静态数据存储接口,详细定义见:IOpenStaticDataEncryptComponent.h
 */
@protocol IOpenStaticDataEncryptComponent;
 
/**
 *  数据采集接口,详细定义见:IOpenDataCollectionComponent.h
 */
@protocol IOpenDataCollectionComponent;
 
/**
 *  动态数据加密接口,详细定义见:IOpenDynamicDataEncryptComponent.h
 */
@protocol IOpenDynamicDataEncryptComponent;
 
/**
 *  静态密钥安全加密接口,详细定义见:IOpenStaticKeyEncryptComponent.h
 */
@protocol IOpenStaticKeyEncryptComponent;
 
/**
 *  获取 umid 接口, 详细定义见 IUMIDComponent.h
 */
@protocol IOpenUMIDComponent;
 
/**
 *  获取 openSDK 接口, 详细定义见 IOpenOpenSDKComponent.h
 */
@protocol IOpenOpenSDKComponent;
 
/**
 *  增强加解密接口, 详细定义见 IOpenAtlasEncryptComponent.h
 */
@protocol IOpenAtlasEncryptComponent;
 
/**
 *  NoCaptcha接口, 详细定义见 IOpenNocpatchaComponent.h
 */
@protocol IOpenNoCaptchaComponent;
 
/**
 *  模拟器检测接口, 详细定义见 IOpenSimulatorDetectComponent.h
 */
@protocol IOpenSimulatorDetectComponent;
 
/**
 *  人机接口, 详细定义见 IOpenSecurityBodyComponent.h
 */
@protocol IOpenSecurityBodyComponent;
 
/**
 *  SecurityGuardSDK管理类
 */
@interface OpenSecurityGuardManager : NSObject
 
/**
 *  获取SecurityGuardManager单例对象
 *
 *  @return SecurityGuardManager单例对象
 */
+ (OpenSecurityGuardManager*) getInstance;
 
/**
 *  获取SecurityGuardManager单例对象
 *
 *  @param authCode 初始化传入authcode
 *
 *  @return SecurityGuardManager单例对象
 */
+ (OpenSecurityGuardManager*) getInstance: (NSString *)authCode
                                    error: (NSError * __autoreleasing *)error;
 
/**
 *  获取安全签名接口
 *
 *  @return 返回签名接口,失败时nil
 */
- (id<IOpenSecureSignatureComponent>) getSecureSignatureComp;
 
 
 
/**
 *  获取动态数据存储接口
 *
 *  @return 返回动态数据存储接口,失败时nil
 */
- (id<IOpenDynamicDataStoreComponent>) getDynamicDataStoreComp;
 
 
 
/**
 *  获取静态数据存储接口
 *
 *  @return 返回静态数据存储接口,失败时nil
 */
- (id<IOpenStaticDataStoreComponent>) getStaticDataStoreComp;
 
 
 
/**
 *  获取静态数据加密接口
 *
 *  @return 返回模拟器检测模块,失败时nil
 */
- (id<IOpenStaticDataEncryptComponent>) getStaticDataEncryptComp;
 
 
 
/**
 *  获取数据采集接口
 *
 *  @return 返回数据采集接口,失败时返回nil
 */
- (id<IOpenDataCollectionComponent>) getDataCollectionComp;
 
 
 
/**
 *  获取动态数据存储接口
 *
 *  @return 返回动态数据存储接口,失败时返回nil
 */
- (id<IOpenDynamicDataEncryptComponent>) getDynamicDataEncryptComp;
 
 
 
/**
 *  获取静态密钥安全加解密接口
 *
 *  @return 返回静态密钥安全加解密接口,失败时返回nil
 */
- (id<IOpenStaticKeyEncryptComponent>) getStaticKeyEncryptComp;
 
 
 
/**
 *  获取UMID接口
 *
 *  @return 返回UMID接口,失败返回nil
 */
- (id<IOpenUMIDComponent>) getUMIDComp;
 
/**
 *  获取OpenSDK接口
 *
 *  @return 返回OpenSDK接口,失败返回nil
 */
- (id<IOpenOpenSDKComponent>) getOpenOpenSDKComp;
 
/**
 *  获取增强加密接口
 *
 *  @return 返回增强加密接口,失败返回nil
 */
- (id<IOpenAtlasEncryptComponent>) getAtlasEncryptComp;
 
/**
 *  获取NoCaptcha接口
 *
 *  @return 返回NoCaptcha接口,失败返回nil
 */
- (id<IOpenNoCaptchaComponent>) getNoCaptchaComp;
 
/**
 *  获取模拟器检测接口
 *
 *  @return 返回模拟器检测接口,失败返回nil
 */
- (id<IOpenSimulatorDetectComponent>) getSimulatorDetectComp;
 
/**
 *  获取人机接口
 *
 *  @return 返回模拟器检测接口,失败返回nil
 */
- (id<IOpenSecurityBodyComponent>) getSecurityBodyComp;
 
 
/**
 *  根据传入的component id获取对应的component对象
 *
 *  @param componentId 目标compoent的id
 *
 *  @return 返回componentId对应的component对象,失败时返回nil
 */
- (id) getComponent: (OpenSecurityGuardComponentID) componentId;
 
/**
 *  根据传入的 protocol 获取接口
 *
 *  @param protocol 要获取的 interface
 *
 *  @return 返回的实现 protocol 的对象
 */
- (id) getInterface: (Protocol*) protocol;
 
 
 
/**
 *  获取sdk当前版本号
 *
 *  @return sdk当前版本号
 */
- (NSString*) getSDKVersion;
 
 
 
/**
 *  是否为外部版本的无线保镖SDK
 *
 *  @return 是否为外部版本的无线保镖SDK
 */
- (BOOL) isOpen;
 
 
 
/**
 *  设置用户数据,用于数据上报
 *
 *  @return 无
 */
+ (BOOL) setGlobalUserData: (NSString *) key
           GlobalUserValue: (NSString *) value;
 
 
@end