mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
FIXME: sqlite3_rekey is discouraged.
This commit is contained in:
1 parent
23dc818eac
commit
cc27c19c66
2 files changed
+10
No files matched your search
@@ -893,6 +893,15 @@ extension Database {
|
||||
}
|
||||
|
||||
func change(passphrase: String) throws {
|
||||
// FIXME: sqlite3_rekey is discouraged.
|
||||
//
|
||||
// https://github.com/ccgus/fmdb/issues/547#issuecomment-259219320
|
||||
//
|
||||
// > We (Zetetic) have been discouraging the use of sqlite3_rekey in
|
||||
// > favor of attaching a new database with the desired encryption
|
||||
// > options and using sqlcipher_export() to migrate the contents and
|
||||
// > schema of the original db into the new one:
|
||||
// > https://discuss.zetetic.net/t/how-to-encrypt-a-plaintext-sqlite-database-to-use-sqlcipher-and-avoid-file-is-encrypted-or-is-not-a-database-errors/
|
||||
let data = passphrase.data(using: .utf8)!
|
||||
let code = data.withUnsafeBytes { bytes in
|
||||
sqlite3_rekey(sqliteConnection, bytes, Int32(data.count))
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
- [ ] sqlite3_rekey is discouraged (https://github.com/ccgus/fmdb/issues/547#issuecomment-259219320)
|
||||
- [ ] fetchedRecordsController.sections.count should return the same result as NSFetchedResultsController when there is no result (1 when empty)
|
||||
- [ ] Store dates as timestamp (https://twitter.com/gloparco/status/780948021613912064, https://github.com/groue/GRDB.swift/issues/97)
|
||||
- Global config?
|
||||
|
||||
Reference in new issue
Block a user