What is the default value of the attribute NSFileProtectionKey
?
There are four possible values, but which one is the default one?
NSFileProtectionNone
NSFileProtectionComplete
NSFileProtectionCompleteUnlessOpen
NSFileProtectionCompleteUntilFirstUserAuthentication
I did not find the answer in the NSFileManager iOS reference doc.
Just to provide the reference:
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.
It seems that the default value is NSFileProtectionCompleteUntilFirstUserAuthentication
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With