views:

1798

answers:

6

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?

+5  A: 

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

John Calsbeek
+9  A: 

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.

Kristoffon
+10  A: 

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.

Parker
+1 for Qt oriented library
Idan K
A: 

You can use this class in the QT: QCryptographicHash.

Ramunas
but you cannot encrypt a whole file!
Berschi
A cryptographic hash is not encryption and cannot be decrypted.
pbhogan
+1  A: 

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).

Jake Petroules
A: 

Qt doesn't provide functionality to encrypt/decrypt.

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

Dahiya