Questions tagged [sqlcipher-android]

encrypt/decrypt Android Sqlite DataBase

https://github.com/sqlcipher/android-database-sqlcipher

98 questions
9
votes
5 answers

net.sqlcipher.database.SQLiteException: file is not a database: , while compiling: select count(*) from sqlite_master

Error this line : mDataBase = SQLiteDatabase.openDatabase(dbPath, "123", null, SQLiteDatabase.NO_LOCALIZED_COLLATORS); When open the database . but whats Wrong? how to open database with password? Can any one help me? I set the password on…
9
votes
1 answer

Android Unable to encrypt database using sqlcipher using greendao

I am using greendao ORM. I am trying to encrypt my database using SQLCipher. Greendao automativally supports sqlcipher. So I wrote the following code for encryption. DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(context,…
8
votes
5 answers

Is my SQLite Database is secured after using SQLCipher?

I have replaced SQLiteOpenHelper with import net.sqlcipher.database.SQLiteOpenHelper For inserting datas into Database and getting data from it, I have used SQLiteDatabase db = this.getWritableDatabase("mypassword"); instead of below SQLiteDatabase…
Kousalya
  • 700
  • 10
  • 29
8
votes
2 answers

How to protect my encryption key in Android?

I have implemented SQLCipher in my Android application to make it's database secure. SQLCipher needs a key to encrypt database file. The problem I am facing is key protection, if my application is used on a rooted device or is reverse engineered…
7
votes
1 answer

How to Store SQLcipher password locally

I'm working on an application which uses SQLcipher and it's offline, So its not possible for me to fetch Key from server to communicate with encrypted database.I have to store it securely somewhere within the device. One solution would be to store…
6
votes
1 answer

Android release crash with exception net.sqlcipher.database.SQLiteException

I've uploaded my app to play store but it still crashes as "crash report image" of developer console shows. on some devices the app did not lunch at all while on other it crashes when start sql query btw proguard is disabled crash report image the…
6
votes
4 answers

Migrating from Existing Room database to Sqlcipher

My app is currently using room database. I'm tying to migrate to use Sqlcipher data base. I have fallbackToDestructiveMigration() enabled but still throwing the following error java.lang.RuntimeException: Exception while computing database live…
Muhammad Nadeem
  • 211
  • 2
  • 14
6
votes
1 answer

Integrating SQLCIPHER in Android Studio Project

I tried integrating SQLCipher in my Android Application, using this link and also some stack-overflow links(but they are out-dated and differs from official document). All the steps are correctly followed, and there is no error in the coding part.…
5
votes
3 answers

file is encrypted or is not a database: , while compiling: select count(*) from sqlite_master;

I have an app that has been in production for years. It ships with the standard Sqlite DB. The lastest version of the app has SqlCipher 3.5.6 library integrated. There are some extra tables in the new DB, so i have created them in the onUpgrade…
turtleboy
  • 8,210
  • 27
  • 100
  • 199
5
votes
1 answer

Unable to Zip Android SQLite Database After Encrypting With SQLCipher

I ship a read only database with my app including it in Assets/Database directory. All data is pre-populated beforehand. After integrating with SQLCipher and encrypting the database I noticed that the APK size ballooned from 25MB to 150MB. Reason…
AlexVPerl
  • 7,652
  • 8
  • 51
  • 83
4
votes
0 answers

How to use Android KeyStore secretKey to encreypt SQLite db with SQLCipher?

I want to generate a key and then use it to encrypt Room DB with SQLCipher, but the problem is SQLCipher requires a CharArray as a key to encrypt SQLite data. is there a way to use secretKey instead of CharArray or at least convert the secretKey to…
4
votes
1 answer

SQLcipher SQLiteException: error code 14: Could not open database

I have a sqllite cipher database that is stored in Downloads folder of android internal memory file system. I can read it by providing a password with "DB browser for sqllite" in normal way in my desktop from anywhere in HDD. Now I want to import…
4
votes
0 answers

Secure text of Android APP so that no one can copy it

I am developing android application. It contains lots of pages and text on those pages. I do not want user to copy these text using any mechanism like obtain text from APK. User can make snapshots and extract text, but I will make sure that it…
Vishal
  • 339
  • 1
  • 9
  • 26
3
votes
1 answer

NoSuchFieldError while using SqlCipher with ProGuard in Android app

Due to security reasons one of the requirement is to encrypt the SQLite database. Hence, i had to use SQLCupher. The application work as expected as long as i do not enable Obfuscation using minifyEnabled true. As soon as i set minifyEnabled true, i…
Zax
  • 2,870
  • 7
  • 52
  • 76
3
votes
1 answer

Android custom migration Sqlcipher from 3 to 4

I upgraded Sqlcipher for Android from 3.5.7 to 4.1.3 in my app. For the existing database, which has been created with Sqlcipher 3, I need a custom migration as it is based on custom parameters, as also the option 3 of this article explains. I'm…
Gigi
  • 359
  • 2
  • 16
1
2 3 4 5 6 7