Default value of NSFileProtectionKey
Asked Answered
K

2

6

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.

Kunzite answered 15/1, 2015 at 10:9 Comment(1)
This link might help #5156289Wilbert
K
4

It seems that the default value is NSFileProtectionCompleteUntilFirstUserAuthentication

Kunzite answered 23/1, 2015 at 14:2 Comment(0)
J
5

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.

Jillian answered 5/1, 2017 at 1:44 Comment(0)
K
4

It seems that the default value is NSFileProtectionCompleteUntilFirstUserAuthentication

Kunzite answered 23/1, 2015 at 14:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.