//
//  AESEncrypt.h
//  MQTTLearn
//
//  Created by RD on 2020/12/16.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface AESEncrypt : NSObject

// 传入16进制content
+(NSString *)cbcEncrypt:(NSString *)content key:(NSString *)key;// cbc加密
+(NSString *)ecbEncrypt:(NSString *)content key:(NSString *)key;// ecb加密
+(NSString *)cbcDecrypt:(NSString *)content key:(NSString *)key;// cbc解密
+(NSString *)ecbDecrypt:(NSString *)content key:(NSString *)key;// ecb解密


+ (NSString *)convertDataToHexStr:(NSData *)data;// data转16进制字符串
+ (NSData *)convertHexStrToData:(NSString *)str;// 16进制字符串转data
@end

NS_ASSUME_NONNULL_END
