@capacitor-community/sqlite中"encryption"、"secret"、"newsecret"三种模式有什么区别?
What is the difference between the three modes "encryption", "secret" and "newsecret" in @capacitor-community/sqlite?
我用下面的capacitor plugin.
我想对移动设备上的数据进行非对称加密。这个插件抽象了加密数据库的可能性,但我不明白模式之间的区别,我不确定我应该使用哪一种。
this.sqlite.open({
database: "my-database",
version: 1,
encrypted: true,
mode: ??? // <--- "encryption" | "secret" | "newsecret"
});
有什么区别?
我问过插件维护者,他的回答是:
- 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.
感谢 Quéau Jean Pierre
我用下面的capacitor plugin.
我想对移动设备上的数据进行非对称加密。这个插件抽象了加密数据库的可能性,但我不明白模式之间的区别,我不确定我应该使用哪一种。
this.sqlite.open({
database: "my-database",
version: 1,
encrypted: true,
mode: ??? // <--- "encryption" | "secret" | "newsecret"
});
有什么区别?
我问过插件维护者,他的回答是:
- 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.
感谢 Quéau Jean Pierre