question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to setup react-native-sqlite-storage with Cipher support?

See original GitHub issue

There was a discussion about this at https://github.com/andpor/react-native-sqlite-storage/issues/40.

It is possible to use react-native-sqlite-storage with Cipher right now? If it is, may someone share the guideline?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sameer-kumar-jaincommented, Aug 12, 2018

@dryganets Sorry for lots of messages. More info from logcat

08-12 18:17:32.706 31656 31685 I ReactNativeJS: SQLite.open({“name”:“SQLiteCipher.sqlite”,“readOnly”:true,“createFromLocation”:“~data/SQLiteCipher.sqlite”,“assetFilename”:“~data/SQLiteCipher.sqlite”}) 08-12 18:17:32.726 31656 31707 E SQLitePlugin: unexpected error, stopping db thread 08-12 18:17:32.726 31656 31707 E SQLitePlugin: java.io.FileNotFoundException: data/SQLiteCipher.sqlite

I don’t understand why is this? Because same works with original.

-EDIT- Okay, looks like I have to place data folder inside assets. I will check encryption now. Thanks

0reactions
dryganetscommented, Aug 14, 2018

You need to configure it. Currently js doesn’t pass the pageSize. If you need to support it it should be straight forward to implement for both Android and iOS. see: https://www.zetetic.net/sqlcipher/sqlcipher-api/

On Mon, Aug 13, 2018, 10:43 AugustLeo notifications@github.com wrote:

@dryganets https://github.com/dryganets I am digging bit more and here is what I found.

I have downloaded sqlitebrowser https://github.com/sqlitebrowser/sqlitebrowser/releasesand created a db, with encryption set to pagesize=1024 which I was able to unlock with your branch. cool

Now I’ve created another database with pagesize=2048 which I am not able to unlock. Any idea? I have updated my git https://github.com/sameerjain/SQLiteDemo.git if you would like to try it out.

Key to both db is sameer@saachi123

Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/andpor/react-native-sqlite-storage/issues/217#issuecomment-412603280, or mute the thread https://github.com/notifications/unsubscribe-auth/AADT2QhkEXiDGoF4NtAdcQZAqLBjt0acks5uQbrSgaJpZM4Q3coO .

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-sqlcipher - npm
SQLCipher(SQLite3) plugin for React Native. ... Start using react-native-sqlcipher in your project by running `npm i react-native-sqlcipher` ...
Read more >
How to use the react-native-sqlite-storage.openDatabase ...
To help you get started, we've selected a few react-native-sqlite-storage examples, based on popular ways it is used in public projects. ; open()...
Read more >
Use encrypted database in react-native - Stack Overflow
I need to create an encrypted database using SQL-cipher in react-native. To do that I found a react-native-sqlite-storage fork modified by ...
Read more >
react-native-sqlite-storage-cipher 2.0.1 on npm - Libraries.io
iOS · Step 1. Install Dependencies · Step 1a. If rnpm link does not work for you you can try manually linking according...
Read more >
Using SQLite with React Native - LogRocket Blog
However, if you're using SQLite bundled with the react-native-sqlite-storage library, you can add the code below to your react-native.config.js ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found