开发者

iOS - Protecting files with a custom encryption key?

开发者 https://www.devze.com 2023-02-02 08:11 出处:网络
Yesterday I posted this question about protecting files: Protecting the app sandbox As mentioned, it appears that this is effective for protecting a file if the user has a passcode on the iPad.Natura

Yesterday I posted this question about protecting files: Protecting the app sandbox

As mentioned, it appears that this is effective for protecting a file if the user has a passcode on the iPad. Naturally this raises the question of how to handle the encryption if the user开发者_如何学Go does not. Now I have an idea, but am not sure if it's feasible or not.

  • Is there any way to override the encryption key to use a custom one? My gut instinct is no, but I figured there may be a way. (Btw, this is just an experiment for fun, I don't plan on submitting this to the app store...) My application has a login, and it would be very handy if this could be handled at the application level to accommodate users that do not have a lock.

However, I suppose it wouldn't be unreasonable to disable the saving feature if there is no device passcode... Any thoughts?


You can generate encryption key, based on login/password, this allowing user to open his files only if he know password. However, you'll need provide ability to restore data in some way if user will forget his password.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号