![]() ![]() Indeed brobybits is correct about the first link. The same key is not recognized if i use PRAGMA journal_mode=OFF, if i remove this definition it works as it should.Īnother thing i noticed by playing around is. It does encrypts it and i was able to use it BUT if i close the application and re open it What i did was to create a new encrypted database with the above function If i use PRAGMA journal_mode=OFF it has problem reading with the key the same database that may created by the sqlcipher. Now some things i noticed and may be needed and you can confirm or not too. Int dbcp = sqlite3_key(dbhandle, PassK.c_str(), strlen(PassK.c_str())) īUT it will not work if you close the program and reopen it cause i was using PRAGMA journal_mode=OFF, when i removed that yes this is the correct way without any errors. What could cause this issue you, yes i was having problem with that as it seems, here is the correct : ![]() (only to the big size database - for all other is working fine with no errors) Int dbcp = sqlite3_key(dbhandle, DBKey, sizeof(DBKey)) The way i use the password is after i open the database like this : I use the same password a test password as a start in both shell and when i open or use sqlite3_key option If i use the shell`s created encrypted new database to the app it says “database is encrypted or is not a database” If i encrypt from the application the big db, after the sqlite3_key i use your function to check but it doesnt execute the function and returns the error "databasee disk image is malformed’ and any other try to connect again says “database is encrypted or is not a database” My main problem is just for personal reasons that i need to reuse the data i allready have inside the encrypted data and also be sure after this that i can ‘rekey’ the database whenever is did all the tries i could by following the link to encrypt from shell and it does but i can t login to the encrypted database anymore. ![]() If i create a new login account creating the db by the app and encrypted it works fine. I manage to encrypt the big size database from the shell of sqlcipher but it is not working cause i can t login (the initials of login in to the application is inside the encrypted database) i use the same KEY in the shell to encrypt and the same in the application i use the db to open it and login but it doesnt accept the correct initials. ![]() I will try the first link though cause it was plaintext and it is the first time that i use sqlcipher to encypt it plus it has many tables, deleted datas, exiting data, etc etc. It may be a memory issue also, i don`t know cause i only have 4GB ram (if this is an issue) This happens only to the big size database, small ones or even creating a new one from the start it works fine from the same application.Īll databases i test is from the same application so it has something to do with the size of it as it seems. It is like somehow it has encrypted the database though the database is unencrypted and all data are readable and i can`t retrieve any information from the database cause it thinks it is encrypted but it is not. Then i check always the database if it is encrypted by opening it in a text as a first step and it is not encrypted. Unfortunately the sqlite3_key doesn t produce any errors in the big database and it passes through as it is correclty encrypted. My understanding is that SQLCipher should be able to handle many gigabytesĪnd even multiple terabytes by design. (will it encrypt and decrypt without problems?) Will become bigger and bigger in size after years inside an application ? Will the encryption have problems after long time use of database that SQLite limits described at Implementation Limits For SQLite are much Least 2MB for LocalStorage, at least 5MB for Web SQL or IndexedDB as I think 1.4 MB is not a very big SQLite database. SQLCipher should report an error if you attempt to use sqlite3_key or See How to encrypt a plaintext SQLite database to use SQLCipher (and avoid “file is encrypted or is not a database” errors) It doesnt encrypt the data allready exists in It is about 1.4 Mb size this database after much use of it and theĮncryption doesnt work. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |