mirror of
https://github.com/QuasarApp/Qt-AES.git
synced 2025-04-27 14:14:31 +00:00
Qt-AES
Small and portable AES encryption class for Qt. Supports all key sizes - 128/192/256 and ECB/CBC modes
Usage
Import the header file
...
QAESEncryption encryption(QAESEncryption::AES_128, QAESEncryption::ECB);
QByteArray encodedHex = encryption.encode(hexText, keyHex);
QByteArray decodedHex = encryption.decode(hexText, keyHex);
Tips
In AES the key needs to be 128/192/256 bits long, an MD5 Hash can be used to generate a 128 bit long QByteArray from a QString, a SHA256 can be used to generate a 256bit key. See the main.cpp file for references on usage
Languages
C++
87.9%
C
8.6%
QMake
3.5%