NSFileProtectionKey 的默认值
Default value of NSFileProtectionKey
属性的默认值是多少 NSFileProtectionKey
?
有四种可能的值,但默认值是哪一种?
NSFileProtectionNone
NSFileProtectionComplete
NSFileProtectionCompleteUnlessOpen
NSFileProtectionCompleteUntilFirstUserAuthentication
我没有在NSFileManager iOS reference doc中找到答案。
默认值好像是NSFileProtectionCompleteUntilFirstUserAuthentication
仅供参考:
https://www.apple.com/business/docs/iOS_Security_Guide.pdf
Protected Until First User Authentication
(NSFileProtectionCompleteUntilFirstUserAuthentication): This class
behaves in the same way as Complete Protection, except that the
decrypted class key is not removed from memory when the device is
locked. The protection in this class has similar properties to desktop
full-volume encryption, and protects data from attacks that involve
a reboot. This is the default class for all third-party app data not
otherwise assigned to a Data Protection class.
...
Data Protection in apps
The iOS Software Development Kit (SDK) offers
a full suite of APIs that make it easy for third-party and in-house
developers to adopt Data Protection and help ensure the highest level
of protection in their apps. Data Protection is available for file and
database APIs, including NSFileManager, CoreData, NSData, and SQLite.
...
User-installed apps that do not opt-in to a specific Data Protection
class receive Protected Until First User Authentication by default.
属性的默认值是多少 NSFileProtectionKey
?
有四种可能的值,但默认值是哪一种?
NSFileProtectionNone
NSFileProtectionComplete
NSFileProtectionCompleteUnlessOpen
NSFileProtectionCompleteUntilFirstUserAuthentication
我没有在NSFileManager iOS reference doc中找到答案。
默认值好像是NSFileProtectionCompleteUntilFirstUserAuthentication
仅供参考:
https://www.apple.com/business/docs/iOS_Security_Guide.pdf
Protected Until First User Authentication
(NSFileProtectionCompleteUntilFirstUserAuthentication): This class behaves in the same way as Complete Protection, except that the decrypted class key is not removed from memory when the device is locked. The protection in this class has similar properties to desktop full-volume encryption, and protects data from attacks that involve a reboot. This is the default class for all third-party app data not otherwise assigned to a Data Protection class.
...
Data Protection in apps
The iOS Software Development Kit (SDK) offers a full suite of APIs that make it easy for third-party and in-house developers to adopt Data Protection and help ensure the highest level of protection in their apps. Data Protection is available for file and database APIs, including NSFileManager, CoreData, NSData, and SQLite.
...
User-installed apps that do not opt-in to a specific Data Protection class receive Protected Until First User Authentication by default.