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
Hello!
When using Sqleet in Sqlite, I encountered the problem of encrypting the database through PRAGMA rekey=NewPassword. Occurs when I import an unencrypted database and try to set a new password for it (the old password is empty). Drops on next error:
A/libc: Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7c69ef8fb0 in tid 24406 (AsyncTask #2), pid 24259
/**
* Changing the database password
* */
public void changeDatabaseEncryptionPassword(String password) throws Exception {
try {
// Encrypts open password
String encryptionPassword = encryptPassword(password);
SQLiteDatabase db = getWritableDatabase(); // 17Mb of unencrypted database
db.execSQL("PRAGMA rekey = " + DatabaseUtils.sqlEscapeString(encryptionPassword)); // the problem is here
} catch (Exception e) {
throw new Exception(e);
}
}
@Override
public void onConfigure(SQLiteDatabase db) {
String encryptionPassword = getEncryptionPassword(currentContext);
db.execSQL("PRAGMA key = " + DatabaseUtils.sqlEscapeString(encryptionPassword));
super.onConfigure(db);
}
In general, I am satisfied with the library. The database can be either encrypted or decrypted by specifying an empty password. And for databases with low weight, everything works both in the direction of encryption and decryption.
Questions arise:
What could this problem be related to and how to fix it?
Are there any restrictions on the size of the encrypted database? In some cases, the process of encrypting and decrypting the database goes without problems. And when I import an unencrypted database backup and try to encrypt it, it crashes on an error "Fatal signal 11..."
Is there enough RAM for the Android device to perform this operation, especially for weighty databases?
Is there a way to encrypt / decrypt large databases (several gigabytes) at the file structure level by reading them piece by piece?
The text was updated successfully, but these errors were encountered:
Hello!
When using Sqleet in Sqlite, I encountered the problem of encrypting the database through PRAGMA rekey=NewPassword. Occurs when I import an unencrypted database and try to set a new password for it (the old password is empty). Drops on next error:
A/libc: Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7c69ef8fb0 in tid 24406 (AsyncTask #2), pid 24259
In general, I am satisfied with the library. The database can be either encrypted or decrypted by specifying an empty password. And for databases with low weight, everything works both in the direction of encryption and decryption.
Questions arise:
The text was updated successfully, but these errors were encountered: