ifish/Ifish/AlibcTradeSDK-3.1.1.96/Frameworks/AlibcTradeCommon.framework/Headers/AlibcSecurityGuardBridge.h

110 lines
1.7 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* AlibcSecurityGuardBridge.h
*
* 阿里百川电商
* 项目名称:阿里巴巴电商 AlibcTradeCommon
* 版本号3.1.1.93
* 发布时间2017-03-06
* 开发团队:阿里巴巴百川商业化团队
* 阿里巴巴电商SDK答疑群号1229144682(阿里旺旺)
* Copyright (c) 2016-2019 阿里巴巴-移动事业群-百川. All rights reserved.
*/
#import <Foundation/Foundation.h>
#ifndef AlibcSecurityGuardBridge_h
#define AlibcSecurityGuardBridge_h
@interface AlibcSecurityGuardBridge : NSObject
#pragma mark - Life Cycle
/**
安全模块初始化
@param handler callback
*/
+ (void)asyncInit:(void (^)(NSError *))handler;
#pragma mark - Info
/**
安全是否可用
@return 安全是否可用
*/
+ (BOOL)isSecurityGuardAvaleable;
/**
authCode
@return auth code
*/
+ (NSString *)authCode;
/**
获取AppKey
@return AppKey
*/
+ (NSString *)getAppKey;
#pragma mark - Encryption & Decryption
/**
解析混淆ID
@param itemId 混淆ID
@return 明文ID
*/
+ (NSNumber *)analyzeItemId:(NSString *)itemId;
#pragma mark - Storage
+ (NSString *)getString:(NSString *)key;
+ (int)putString:(NSString *)value forKey:(NSString *)key;
+ (NSData *)getData:(NSString *)key;
+ (int)putData:(NSData *)value forKey:(NSString *)key;
@end
/**
Security Adapter 协议
*/
@protocol AlibcSecurityAdapter <NSObject>
- (void)asyncInit:(void (^)(NSError *))handler;
#pragma mark - Info
- (NSString *)getAppKey;
#pragma mark - Encryption & Decryption
- (NSNumber *)analyzeItemId:(NSString *)itemId;
#pragma mark - Storage
- (NSString *)getString:(NSString *)key;
- (int)putString:(NSString *)value forKey:(NSString *)key;
- (NSData *)getData:(NSString *)key;
- (int)putData:(NSData *)value forKey:(NSString *)key;
@end
#endif