Documentation

This commit is contained in:
Gwendal Roué committed 2019-09-02 08:38:15 +02:00
1 parent 1ba4e8c771
commit 0b9fe9ae92
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -141,12 +141,12 @@ The integration of GRDB with SQLCipher has changed.
2. The default SQLCipher version which comes with GRDB 4 is now SQLCipher 4, which is incompatible with SQLCipher 3. SQLCipher 3 is still supported, though. See [Encryption] for more details.
3. The `cipherPageSize` and `kdfIterations` configuration properties are discontinued. With GRDB 4, run sql pragmas in the `prepareDatabase` property of the configuration:
3. The `cipherPageSize` and `kdfIterations` configuration properties are discontinued. With GRDB 4, run sql pragmas in the `onConnect` method of the configuration:
```swift
var configuration = Configuration()
configuration.passphrase = "secret"
configuration.prepareDatabase = { db in
configuration.onConnect { db in
try db.execute(sql: "PRAGMA cipher_page_size = 4096")
try db.execute(sql: "PRAGMA kdf_iter = 128000")
}
+1 -1
View File
@@ -963,7 +963,7 @@ extension Database {
/// Call this method from Configuration.onConnect, as in the example below:
///
/// var config = Configuration()
/// config.prepareDatabase = { db in
/// config.onConnect { db in
/// try db.usePassphrase("secret")
/// }
public func usePassphrase(_ passphrase: String) throws {
+2 -2
View File
@@ -257,13 +257,13 @@ extension ValueObservation {
}
extension Configuration {
@available(*, unavailable, message: "Run the PRAGMA cipher_page_size in Configuration.prepareDatabase instead.")
@available(*, unavailable, message: "Run the PRAGMA cipher_page_size in Configuration.onConnect instead.")
public var cipherPageSize: Int {
get { preconditionFailure() }
set { preconditionFailure() }
}
@available(*, unavailable, message: "Run the PRAGMA kdf_iter in Configuration.prepareDatabase instead.")
@available(*, unavailable, message: "Run the PRAGMA kdf_iter in Configuration.onConnect instead.")
public var kdfIterations: Int {
get { preconditionFailure() }
set { preconditionFailure() }