You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As shown in this file below, db.rekey() will either change the key or it will encrypt a database with the key if it was not encrypted previously. Is there a way for me to check if the DB is encrypted before I call db.rekey()? I only want to run db.rekey() if the db isn't encrypted, just so it will get encrypted, but then in future cases, I will only want to use db.key() to access database. No need to change the key. It looks like there is an internal function called cipher_key_check() that checks that, any way to expose this somehow to make it an easy check?
As another comment, I tested rekey() on an open, unencrypted database, and it didn't encrypt that database? Either I did something wrong, or that is not the correct functionality. In the original documentation for SQLCipher it doesn't do that.
As shown in this file below,
db.rekey()
will either change the key or it will encrypt a database with the key if it was not encrypted previously. Is there a way for me to check if the DB is encrypted before I calldb.rekey()
? I only want to rundb.rekey()
if the db isn't encrypted, just so it will get encrypted, but then in future cases, I will only want to usedb.key()
to access database. No need to change the key. It looks like there is an internal function calledcipher_key_check()
that checks that, any way to expose this somehow to make it an easy check?SQLite.swift/Sources/SQLite/Extensions/Cipher.swift
Line 41 in 861ff28
The text was updated successfully, but these errors were encountered: