什么是新的“iOS数据保护API”? [英] What are the new "iOS data protection APIs"?

查看:178
本文介绍了什么是新的“iOS数据保护API”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您使用Google的「iphone数据保护API」,您会看到根据新闻稿发布的数据。



如果您查看http://support.apple.com/kb/HT4175 ,您可以直接看到Apple做出指示。



这些API在哪里/什么?我在iOS4之前使用了旧的加密API,因此它们不是这些
这些API应该为第三方应用程序提供MDM(移动设备管理)类型的功能。



TIA!


NSData 有一些 FileProtection 选项可以设置, code>到磁碟:




  • NSDataWritingFileProtectionComplete

  • NSDataWritingFileProtectionNone



NSFileProtectionKey ,您可以通过 NSFileManager 在磁盘上预先存在的文件上设置:




  • NSFileProtectionComplete

  • NSFileProtectionNone



应用程式委托还会通知您的应用程式何时不能存取受保护的资料: p>


  • -applicationProtectedDataDidBecomeAvailable:

  • -applicationProtectedDataWillBecomeUnavailable:



加密和保护数据的所有细节都由硬件和操作系统。它是防火忘记的保护,每当设备锁定时启动。


If you Google "iphone data protection apis" you'll see a zillion hits based on press releases.

If you check out http://support.apple.com/kb/HT4175 you can see Apple making the indication directly.

Where are/what are these APIs? I've used the old crypto APIs before iOS4, so they're not those. These APIs are supposed to give MDM (Mobile Device Management)-type capability for 3rd-party apps.

TIA!

解决方案

There are some FileProtection options you can set when writing an NSData to disk:

  • NSDataWritingFileProtectionComplete
  • NSDataWritingFileProtectionNone)

as well as an extended attribute, NSFileProtectionKey, you can set on pre-existing files on disk via NSFileManager:

  • NSFileProtectionComplete
  • NSFileProtectionNone

The app delegate is also informed of when your application is (not) going to be able to access protected data:

  • -applicationProtectedDataDidBecomeAvailable:
  • -applicationProtectedDataWillBecomeUnavailable:

All the gory details of encrypting and securing the data are handled by the hardware and OS on your behalf. It's fire-and-forget protection that kicks in whenever the device locks.

这篇关于什么是新的“iOS数据保护API”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆