简体   繁体   English

使用RNCryptor库解密时出现问题

[英]I am having issues while decryption using RNCryptor Library

While decrypting I get the error : The operation couldnot be performed RNCryptorError 1 I dont understand what I am doing wrong. 解密时出现错误:无法执行该操作RNCryptorError 1我不知道我在做什么错。 Here is my block of code 这是我的代码块 在此处输入图片说明

For anyone who might search here: this is a duplicate of RNCryptor#174 , and you may want to read there as well. 对于可能在这里搜索的任何人:这是RNCryptor#174的重复,您可能也想在那里阅读。

Please just post code into the question rather than a screenshot. 请仅将代码发布到问题中,而不是截图。 I can't compile a screenshot, and they're very hard to read. 我无法编译屏幕截图,而且很难阅读。

Error 1 is an HMAC error. 错误1是HMAC错误。 Either your data is corrupted or your password is incorrect. 您的数据已损坏或密码不正确。

Note that NSException never makes sense in Swift. 注意NSException在Swift中永远没有意义。 Switch can't catch them. 开关不能抓住他们。 They only make sense in ObjC if you're going to crash the program shortly after. 仅当您稍后要使程序崩溃时,它们才在ObjC中有意义。 They're not memory-safe in ObjC. 它们在ObjC中不是内存安全的。 You meant to use Swift's throw and ErrorType, which are unrelated to raise or NSException. 您打算使用Swift的throw和ErrorType,它们与引发或NSException无关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我在ORKResultPredicate的predicateForConsent函数中遇到问题 - I am having issues with predicateForConsent function of ORKResultPredicate 我在合并字典中的数据时遇到问题 - I am having issues consolidating data from dictionaries 我如何为用户实现加密/解密,同时又能够解密服务器端的所有内容 - How would I achieve encryption/decryption for users, while also having the ability to decrypt everything serverside 我正在尝试从 Swift subreddit 解析 JSON。 为什么我有问题? - I am trying to parse JSON from the Swift subreddit. Why am I having issues? 我在导入模块 Firebase 时遇到问题 - I am having a issue while importing a module Firebase 菜单选项卡中有问题。 我正在使用carbonKit框架 - Having an issue in Menu Tabs. And I am using carbonKit Framework 为什么在创建 XCFramework 时出现此错误?:为 iOS 模拟器构建时,在路径中找不到库 - Why am I getting this error while creating XCFramework?: While building for iOS Simulator, no library was found in path 我正在使用Whisper swift库,是否有办法判断耳语是否可见? - I am using the Whisper swift library, is there a way to tell if a whisper is visible or not? 使用RNCryptor解密base64编码和AES加密的字符串 - Decrypt a base64 encoded and aes encrypted string using RNCryptor 使用Swift Package Manager时出现问题 - I am getting an issue while using swift package manager
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM