andpor / react-native-sqlite-storage

Full featured SQLite3 Native Plugin for React Native (Android and iOS)
MIT License
2.76k stars 520 forks source link

Database Encryption not working Android #430

Closed Crodaycat closed 4 years ago

Crodaycat commented 4 years ago
## Expected Behavior Throw error opening database because wrong encryption pass phrase. ## Current Behavior Database opens and fetch data. ## Steps to Reproduce (for bugs) ``` const db = SQLite.openDatabase( { name: 'db4.db', key: 'password...', location: 'default' }, openCB, errorCB ); ``` Is Wotking the same as: ``` const db = SQLite.openDatabase( { name: 'db4.db', location: 'default' }, openCB, errorCB ); ``` ``` function errorCB(err) { console.log('SQL Error: ' + err); } function openCB() { console.log('Database OPENED'); } ``` ## Context Open a database with key param and then open it again without key param works the same. ## Your Environment IDE: VSCode + Android Studio AVD Dependencies: react-native: 0.60.6 react-native-sqlite-storage: ^5.0.0 react-native.config.js: ``` module.exports = { dependencies: { 'react-native-sqlite-storage': { platforms: { android: { sourceDir: '../node_modules/react-native-sqlite-storage/platforms/android-native', packageImportPath: 'import io.liteglue.SQLitePluginPackage;', packageInstance: 'new SQLitePluginPackage()', }, }, }, }, }; ``` ## Debug logs ```Database OPENED```
MichaelKovich commented 3 years ago

@Crodaycat Did you ever find a solution for this?

gabimoncha commented 3 years ago

Have you tried this fork?