123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- /*
- * 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
|