feat: 税务APP的可信插件

This commit is contained in:
zoujing
2023-04-13 17:23:15 +08:00
parent e1795f2de2
commit 9d7058bbe4
104 changed files with 3346 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
//
// NSString+KYSM4.h
// Hug
//
// Created by WJT on 2018/6/11.
// Copyright © 2018年 WJT. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString (KYSM4)
/**
* 使用密钥和初始化向量生成CBC模式的SM4加解密对象
*
* @param secretKey 密钥
* @param iv 初始化向量
*
* @return SM4加密字符串
*/
- (nullable NSString *)encryptionWithSM4Key:(nonnull NSString *)secretKey iv:(nonnull NSString *)iv;
/**
在CBC模式下利用给定的密钥初始化向量对字符串解密
@param secretKey 密钥
@param iv 初始化向量
@return SM4解密字符串
*/
- (nullable NSString *)decryptionWithSM4Key:(nonnull NSString *)secretKey iv:(nonnull NSString *)iv;
/**
* 使用密钥生成ECB模式的SM4加解密对象
*
* @param secretKey 密钥
*
* @return SM4加解密对象
*/
- (nullable NSString *)encryptionWithSM4Key:(nonnull NSString *)secretKey;
/**
* 在ECB模式下利用给定的密钥对字符串解密
*
* @param secretKey 密钥
*
* @return SM4解密字符串
*/
- (nullable NSString *)decryptionWithSM4Key:(nonnull NSString *)secretKey;
/**
* hmacSM3加密
*
* @param secretKey 密钥
*
* @return hmacSM3加密字符串
*/
- (nullable NSString *)encryptionWithSM3Key:(nonnull NSString *)secretKey;
@end