简体   繁体   English

SQLCipher,加密核心数据和iOS-两个.sqlite文件是否正常?

[英]SQLCipher, encrypted-core-data and iOS - are two .sqlite-files normal?

I'm using SQLCipher to encrypt my database as there's sensitive information. 由于存在敏感信息,我正在使用SQLCipher加密数据库。 Everything seems to work, I'm just irritated because I've got two .sqlite-files right now: 一切似乎都正常,我很生气,因为我现在有两个.sqlite文件:

~/Library/Application Support/MyData.sqlite
~/Library/Application Support/MyApp/MyData.sqlite
~/Library/Application Support/MyApp/MyData.sqlite-shm
~/Library/Application Support/MyApp/MyData.sqlite-wal

The first one is encrypted, the second isn't - but it doesn't contain any information. 第一个是加密的,第二个则不是-但它不包含任何信息。 So it seems to work as there's no way to get to the information, but I just wanted to ensure that this is correct. 由于无法获取信息,因此它似乎起作用了,但是我只是想确保这是正确的。

You'll need to turn off the Write Ahead Logging feature of sqlite. 您需要关闭sqlite的Write Ahead Logging功能。 To do this in Core Data, you need to set a pragma option on your store. 要在Core Data中执行此操作,您需要在商店上设置编译指示选项。 You can see how to set the flag from this related stackoverflow question 您可以从这个相关的stackoverflow问题中看到如何设置标志

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM