Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8393729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:52:37+00:00 2026-06-09T19:52:37+00:00

I have a database containing private information that must only be accessible to my

  • 0

I have a database containing private information that must only be accessible to my application. I added my database file in assets folder which gets copied over to applications database directory on first time the app runs but “assets” directory and “data” directory(on rooted devices) can be accessed by any other application So I decided to encrypt the database. Android default SQLite Database doesn’t provide encryption of the data so I decided to use SQLCipher for android http://sqlcipher.net/sqlcipher-for-android/.

Now I have successfully encrypted the database and I can access it using the specific password. But problem remains… Where should I store this password? so that it can only be accessible to my application.

  1. Can’t hardcode it as it will be accessible after decompiling it even if it is obfuscated.
  2. Can’t store it in the file system either (assets/raw)
  3. Can’t ask the user to enter it as the user could be a hacker

It is standalone app with no server interaction at all

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:52:39+00:00Added an answer on June 9, 2026 at 7:52 pm

    Can't ask the user to enter it as the user could be a hacker Then you have no way to securely store it. For the same reasons you’ve already identified, specifically that your code can be decompiled, any place you store it that is accessible can be figured out through decompilation and hence retrieved by any code with the right access.

    Something the user provides is stored wherever the user stores it — presumably in his or her head. This is not something software can access, which makes it ideal for reducing the risk of a malware attack. If the entered password is valid, you have no way to know if the user is authorized or not, however you can define policy such as a minimum key length, a maximum number of entry attempts (before introducing some delay or other lockout), etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a (DB2) database table containing location information, one column of which is
I have a small database with tables containing a small amount of data which
I have designed a class containing some information about a given object which will
I have data database containing some rather large strings, each of which holds a
I have a database containing one table, i want to generate CSV file with
Suppose I have a database containing 3 tables in a grails application: User Activity
I have a database table containing network information (servers, clusters etc). Is there any
Say I have at database table containing information about a news article in each
I have a standalone Java application that gets data from a database and displays
In my Codeigniter controller have the following private function which validates file uploads. private

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.