I have a string that I write and read inside the text file. I want to encrypt this strig. Do I have to use the QCryptographicHash library for this? If I need to use QCryptographicHash can you give me an example of that?
CodePudding user response:
QCryptographicHash
is not able to encrypt your data. Actually, this class is made to compute a hash from your data, which can be seen as a descriptor of your data.
You can find more details here.
To encrypt/decrypt your data, you will need to find an external library which handles it (Crypto , etc...).
CodePudding user response:
You should use QCA which is Qt Cryptographic Architecture. In Ubuntu/Debian based Linux you can get it using
sudo apt install libqca-qt5-2 libqca-qt5-2-dev libqca-qt5-2-plugins
Here is a bunch of examples.