Encrypt & Decrypt Sqlite file (Using Core Data)

前端 未结 3 1451
孤独总比滥情好
孤独总比滥情好 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: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.

提交回复
热议问题