Encrypt & Decrypt Sqlite file (Using Core Data)

前端 未结 3 1459
孤独总比滥情好
孤独总比滥情好 2021-02-10 14:33

I am using a Pre-Populated SQLite Database with Core Data.

My problem is that i want to encrypt sqlite database file generated by Core Data

相关标签:
3条回答
  • 2021-02-10 15:02

    Data protection is a feature available for iOS 4 devices that offer hardware encryption: iPhone 4, iPhone 3GS, iPod touch (3rd generation or later), and all iPad models. This article outlines how to enable and verify data protection.

    http://support.apple.com/kb/HT4175

    Hope this helps

    0 讨论(0)
  • 2021-02-10 15:06

    Apple includes support for its CommonCrypto library in iOS, and has a sample code project to demonstrate use of asymmetric and symmetric encryption/decryption.

    Which approach you take depends on how you intend to secure the data; a symmetric approach could require storing the key in the application, which reduces security somewhat. But the sample code should get you started, either way.

    0 讨论(0)
  • 2021-02-10 15:07

    Data Protection:

    Data protection is a feature available for iOS 4 devices that offer hardware encryption: iPhone 4, iPhone 3GS,  iPod touch (3rd generation or later), and all iPad models. This article outlines how to enable and verify data protection.

    http://support.apple.com/kb/HT4175

    Link to apple article from way back machine as original link is removed

    Apple developer blog describing functional part of NSFileProtectionComplete.

    “NSFileProtectionComplete
    
            The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting.”
    
    0 讨论(0)
提交回复
热议问题