-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usage with the sqflite_common api? #43
Comments
@ramsestom What do you mean? Could you give an example? |
@davidmartos96 |
@ramsestom Doing that you are basically reimplementing the Dart side of sqflite_sqlcipher. Under the hood this package uses sqflite_common and has a databaseFactory that returns an encrypted Database. |
Take a look at this file: https://www.github.com/davidmartos96/sqflite_sqlcipher/tree/master/sqflite%2Flib%2Fsrc%2Fdatabase_sql_cipher_impl.dart As you can see, the password is injected in the openDatabase platform channel method. |
Does the |
@ramsestom No, that would be the factory. In any case, note that even if you used the sqflite_common API for SQLCipher, you would be missing the native implementation (android, ios and macos). |
@ramsestom Sorry, I didn't see the code above, now I understand better. But, note that if you are building a general solution for migrations, you need the SqlCipher native library. Importing |
OK the factory use a to clarify the situation: |
Is there a way to declare |
@ramsestom I don't think there is, but you can do a good old find and replace 😅 |
On a side note, if you are looking for desktop support check out the following post. #42 Maybe you don't need this library at all. |
Trying to use
sqflite_sqlcipher
as a replacment ofsqflite
in a third party library that uses thesqflite_common
api to open a databseIt uses the
DatabaseFactory.openDatabase(String path, {OpenDatabaseOptions? options});
method to open the database. So is it possible to pass the password field to this function as an option?Here is the code of the function used to open a database:
I added it the optional
String? password
parameter but now I would like to pass it along to theDatabaseFactory.openDatabase()
sqflite_common API functionThe text was updated successfully, but these errors were encountered: