本文介绍了在iOS中离线打开和存储加密文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我已加密文件下载并可在文件夹中离线查看,我想知道: 在适当的阅读器中打开它们,因为这些是ms office docs和prezi格式 我假设他们必须未加密才能让读者阅读,如何确保安全? 要使用哪个文件夹避免iCloud同步,我已经阅读了这个禁用iCloud同步 iOS通过基于应用程序键的加密保护应用程序的文档我读了还是错了? 解决方案 Sven正确的关于 UIDocumentInteractionController ,并且对象通过URL标识。 t需要解密您的文件在磁盘上,这是工作。您可以编写自己的小网址协议(子类 NSURLProtocol 并适当地实施方法;您应该最终检查URL是否在您创建的发明方案中 - 例如 myApplicationEncrypted:// - 然后将数据包发布到 NSURLProtocolClient ),然后通过 NSURLProtocol + registerClass 。 磁盘和协议客户端。因此,您将传递未加密的数据 - 您需要对 UIDocumentInteractionController 进行信任判断。 文档交互控制器已记录在您的应用程序中工作,因此不应该有沙箱问题。 I have encrypted files downloaded and available for offline view in a folder, I would like to know:how to open them in the appropriate reader as these are ms office docs and prezi formatI suppose they will have to be unencrypted so that reader can read them but in this case how to ensure security?which folder to use to avoid iCloud sync, I already read this Disable iCloud syncDoes iOS protects documents of the application by encryption based on app key as I read it or am I wrong? 解决方案 Speaking extemporaneously, as thoughts occur, Sven is right about UIDocumentInteractionController and that objects are identified by URL.However, it's possible you don't need to unencrypt your files on disk for this to work. You can probably write your own little URL protocol (subclass NSURLProtocol and implement methods appropriately; you should end up checking that URLs are within the invented scheme you've created — e.g. myApplicationEncrypted:// — then posting data packets to a NSURLProtocolClient) and register it with the device via NSURLProtocol +registerClass.You'll obviously need to decrypt between disk and protocol client. So you'll be passing unencrypted data on — you'll need to make a trust judgment on UIDocumentInteractionController.The document interaction controller is documented to work within your app, so there shouldn't be sandbox concerns. 这篇关于在iOS中离线打开和存储加密文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-12 10:30