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
//
//  TBSDKSecurity.h
//  mtopsdk
//
//  Created by sihai on 10/9/14.
//  Copyright (c) 2014 mtop. All rights reserved.
//
 
#import <Foundation/Foundation.h>
 
@interface TBSDKSecurity : NSObject
 
/**
 * 获取共享的单例
 *
 */
+ (TBSDKSecurity*) instance;
 
 
/**
 * 通过AVMP获取MWUA
 * @paraml input 白盒签名
 */
 
- (NSString *)getMwua:(NSString *)input;
 
/**
 * @param timestamp             时间戳
 * @param appkey                appkey
 * @param flag                  生成不同类型Wua的标识位
 *
 */
- (NSString*) wua: (NSString*) timestamp
           appkey: (NSString*) appkey
         authCode: (NSString*) authCode
             flag: (int)flag;
 
/**
 * security type for hmac-sha1
 *
 * @param text                secret context
 * @param secret              secret key
 */
+ (NSString *)hmacsha1:(NSString *)text key:(NSString *)secret;
 
/**
 * 获取 mini wua
 * @param extParam 安全需要的额外参数
 @return 获取人机识别标识 mini wua
 */
- (NSString *)fetchMiniWua:(NSDictionary *)extParam;
 
 
/**
 mtop环境映射保镖环境
 
 @return 安全保镖当前环境
 */
- (int)envMapToSecurityGuardEnv;
 
 
/**
 *  根据传入的 protocol 获取接口. 无线保镖接口封装。
 *  @param protocol 要获取的 interface
 *  @return 返回的实现 protocol 的对象
 */
- (id) getInterface: (Protocol*) protocol;
 
@end