2

我已在文件夹中下载并可供离线查看的加密文件,我想知道:

  • 如何在适当的阅读器中打开它们,因为它们是 ms office docs 和 prezi 格式

  • 我想它们必须是未加密的,以便读者可以阅读它们,但在这种情况下如何确保安全?

  • 使用哪个文件夹来避免 iCloud 同步,我已经阅读了这个禁用 iCloud 同步

  • iOS是否在我阅读时通过基于应用程序密钥的加密来保护应用程序的文档,还是我错了?

4

2 回答 2

2

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.

于 2012-08-21T21:30:08.730 回答
0

您可以使用UIDocumentInteractionController对象将您的文档发送到其他应用程序。您使用指向您的文档的文件 URL 对其进行初始化,然后使用其中一种方法来呈现它。

这负责显示预览(如果可能)并让用户选择应在其中打开文档的应用程序。

该文档必须被解密才能正常工作。然后,您无法对文件的安全性做出任何保证 - 一旦将其移交给另一个应用程序,它就不受您的控制。

如果您的应用程序没有明确选择使用 iCloud 同步,您的数据将不会与 iCloud 同步。发送到 iCloud 的是整个设备的备份(如果启用)。正如您在链接的问题中已经阅读的那样,有一些方法可以为单个文件禁用此功能。

iOS 文件保护基于设备密钥,而不是每个应用程序密钥。这也不是必需的,因为应用程序受到沙盒的相互保护,除非您的手机已越狱。在越狱的手机上没有安全保证。

于 2012-08-21T21:12:01.767 回答