mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-30 04:28:44 +00:00
Documentation improvement
This commit is contained in:
1 parent
7be7e1cade
commit
9628eaffb9
1 file changed
+2
-2
@@ -6420,9 +6420,9 @@ For even better control over the lifetime of the passphrase in memory, use a Dat
|
||||
// RECOMMENDED: only load the passphrase when it is needed and reset its content immediately after use
|
||||
var config = Configuration()
|
||||
config.prepareDatabase { db in
|
||||
let passphrase: Data = try getPassphraseData()
|
||||
let passphrase = try getPassphraseData() // Data
|
||||
defer {
|
||||
if (data.count > 0) { data.resetBytes(in: 0..<data.count) }
|
||||
passphrase.resetBytes(in: 0..<data.count)
|
||||
}
|
||||
try db.usePassphrase(passphrase)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user