I use the following capacitor plugin.
I would like to asymmetric encrypt my data on the mobile devices. This plugin abstracts the possibility to encrypt the database but I don't understand the difference between the modes and I'm not sure which one I should use.
this.sqlite.open({
database: "my-database",
version: 1,
encrypted: true,
mode: ??? // <--- "encryption" | "secret" | "newsecret"
});
What are the differences?
I have asked the plugin maintainer and his answer is:
- the mode "encryption" is to be used when you have an already existing database non encrypted and you want to encrypt it.
- the mode "secret" is to be used when you want to open an encrypted database.
- the mode "newsecret" is to be used when you want to change the secret of an encrypted database with the newsecret.
thanks to Quéau Jean Pierre