iphone - Objective C AES256 解密

标签 iphone objective-c

我必须解密(AES 256) objective-c 中的字符串。

我有对方用来加密的Key和IV(C#)。

你能帮我吗?

最佳答案

请看看这个application

您需要做的就是从存储库 AES256AndBase64 添加 Helper 类在您的应用程序中, #import "NSString+AESCrypt.h" 到您所需的文件中。

使用- (NSString *)AES256DecryptWithKey:(NSString *)key方法解密数据:

    NSString* dummyString=@"Steve Job";

    NSLog(@"Normal String- %@",dummyString);

    NSString* encrypt_decrypt_Key=@"apple";

    NSString *encryptString = [dummyString
                                  AES256EncryptWithKey:encrypt_decrypt_Key];

    NSLog(@"Encrypt String- %@",encryptString);

    NSString *decryptString = [encryptString
                               AES256DecryptWithKey:encrypt_decrypt_Key];

    NSLog(@"Decrypt String- %@",decryptString);

关于iphone - Objective C AES256 解密,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13515250/

相关文章:

iphone - 使用自定义键盘调用 textFieldShouldReturn

iphone - 闪烁时间戳

iphone - 如何在不指定大小的情况下为整个 iOS 应用程序设置自定义字体

iphone - 多个复选框选择值显示到 TableView 的不同单元格中

ios - UIView 未调整大小以填充 iPhone 6 窗口

iphone - UIButton 不调用目标的选择器

iPhone iOS 如何向按钮文本或图像下的 UIButton 添加线性渐变?

objective-c - 如何更改 NSPopover 箭头位置?

ios - 将 DatePicker 日期转换为 UTC 格式返回 NULL

iphone - 想要在 UITableView 中从右向左滑动时显示删除按钮