How to encrypt and decrypt a file with Qt/C++?

拜拜、爱过 提交于 2019-12-17 22:42:44

问题


I want to create a program, which can encrypt and decrypt a complete file with an individual password. Is there any way to manage this in Qt and/or C++ and how?


回答1:


I've never used it myself, but I've heard great things about QCA. It's cross platfrom, uses a Qt-style API and Qt datatypes.




回答2:


www.cryptopp.com is a very complete C++ library with implementations of most algorithms.

The actual program (select file, read, obtain key, encrypt etc) should be piece of cake.




回答3:


Old, I know, but try Botan. It's actually used internally by Qt Creator 2.0. If you download the Qt Creator 2.0 sources you can find a copy of Botan 1.8.8 all set up for the Qt build system (qmake).




回答4:


Neither Qt nor the C++ standard library have encryption built-in. You'll need another external library to handle encryption.




回答5:


Qt doesn't provide functionality to encrypt/decrypt.

QCryptographicHash only generates hashes. It is not what you are looking for.



来源:https://stackoverflow.com/questions/1262081/how-to-encrypt-and-decrypt-a-file-with-qt-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!