Feature Request: Add Encryption
socalrunner opened this issue · 5 comments
We are looking at using this plugin but our app will require that at least some of the data is encrypted at rest. Is it possible to encrypt the SQLite DB file?
@socalrunner it could be possible, i will have look to evaluate and come back
@socalrunner
can you have a look and test
npm install --save capacitor-data-storage-sqlite@dev
can you revert to me on your testing the method openStore with different properties allow for encryption see below:
## Methods available for encryption IOS and Android
### `openStore({database:"fooDB", table:"fooTable", encrypted:false, secret:'test secret'}) => Promise<{result:boolean}>`
Encrypt an existing store with a secret key and open the store with given database and table names
#### Returns
Type: `Promise<{result:boolean}>`
### `openStore({database:"fooDB",table:"fooTable", encrypted:true, secret:'test secret'}) => Promise<{result:boolean}>`
Open an encrypted store with given database and table names and secret key
#### Returns
Type: `Promise<{result:boolean}>`
### `openStore({database:"fooDB",table:"fooTable", encrypted:true, secret:'test secret', newsecret:'test new secret'}) => Promise<{result:boolean}>`
Modify the secret key with the "newsecret" key of an encrypted store and open it with given database and table names and "newsecret" key
#### Returns
Type: `Promise<{result:boolean}>`
@jepiqueau will do, I'll test it this week. Thank you!
@socalrunner this has been implemented for IOS and Android plugins. this release of the plugin is going to be deprecated visit @jeepq/capacitor for new releases
Thank you @jepiqueau, we'll pull that in and test it.