Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教个加密的问题 #35

Closed
aolphn opened this issue Jun 16, 2017 · 6 comments
Closed

请教个加密的问题 #35

aolphn opened this issue Jun 16, 2017 · 6 comments
Labels

Comments

@aolphn
Copy link

aolphn commented Jun 16, 2017

将密码的byte数组传进去加密了,如果我拿到数据库文件想在其他地方查看的话怎么看(如果工具让输入密码,我怎么根据设置的密码 生成 数据库实际使用的密码?),wcdb在底层是否对byte进一步运算生成了新密码?。

@RingoD
Copy link
Collaborator

RingoD commented Jun 16, 2017

SQLCipher会根据key生成真正的密钥。
安装一个命令行的sqlcipher或者用绝大部分软件都能打开,密钥只需要输入你传入的那个。

@aolphn
Copy link
Author

aolphn commented Jun 16, 2017

@RingoD 实际传入wcdb的参数是byte数组,但我输入密码应该输入的是字符串?

@RingoD
Copy link
Collaborator

RingoD commented Jun 16, 2017

如果密钥是字符串,然后转成二进制的,则直接输入字符串即可

@aolphn
Copy link
Author

aolphn commented Jun 17, 2017

@RingoD 好的,多谢!

@RingoD RingoD closed this as completed Jun 17, 2017
@aolphn
Copy link
Author

aolphn commented Aug 15, 2017

@RingoD 大佬,我用下载的一个软件貌似打不开加密数据库。我是按你说的把密码转成二进制的字符串复制进去的

@RingoD
Copy link
Collaborator

RingoD commented Aug 15, 2017

设置正确的密码 以及 cipher_page_size = 4096

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants