Search code examples
windowsuwpwinrt-xaml

UWP Sqlite db encryption


I'm developing an enterprise UWP application. I'm using sqlite db to store the customer data. It gets stored in the sandboxed folder. But any user can navigate to that folder and access the db and get the data. I'm feeling this as an security issue. So I trying encrypting the data, but the retrival of data is very slow. Can anyone please suggest me if this is safe approach or is there anyother better approach than this.


Solution

  • The application folder is a restricted folder, If the user want to access it through the file explorer, the user needs to access it as an administrator and have elevated permissions. This is the system's protection for UWP application folders.

    If you need simple encryption, you can consider encrypting the data stored in the database (such as using Base64 encryption when writing a field, and using Base64 decryption when reading it).

    Generally speaking, the data stored using Sqlite should not be sensitive data. If you have doubts about data security, please consider other data access solutions.

    For example, hosting the database on the server allows the client to indirectly access the data in the database through API.