如何使用SQLCipher检查文件是否以正确的加密模式加密?

huangapple go评论110阅读模式
英文:

How to check if the file encrypted with correct encrypted mode using SQLCipher?

问题

SQLCipher库默认使用AES/CBC加密,而我想要使用AES/CFB加密并且不使用填充来加密数据库。我已经使用下面的语句来更改加密模式:encryptedDB.rawExecSQL("PRAGMA cipher = 'aes-256-cfb';");

现在,我该如何验证它是否以这种模式正确加密了?

英文:

The SQLCipher library uses AES/CBC encryption by default whereas I want to encrypt the data base with AES/CFB encryption with no padding. I have used below statement to change the mode encryptedDB.rawExecSQL("PRAGMA cipher = 'aes-256-cfb';");

Now, How can I verify it is encrypted correctly with this mode?

答案1

得分: 0

以下是查找加密模式的命令,但自版本4.0.0起已移除支持。

> PRAGMA 'your_key';
> PRAGMA cipher;
英文:

Below is the command to find out the cipher mode but this support is removed since version 4.0.0.

> PRAGMA 'your_key'; 
> PRAGMA cipher;

huangapple
  • 本文由 发表于 2023年7月3日 19:09:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/76604177.html
  • sqlcipher-android
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定