PictureCrypt
1.4.1
An image-steganography project
|
The QAESEncryption class Small and portable AES encryption class for Qt. Supports all key sizes - 128/192/256 bits - ECB, CBC, CFB and OFB modes. Class made entirely by bricke. Github: https://github.com/bricke/Qt-AES. More...
#include <qaesencryption.h>
Public Types | |
enum | Aes { AES_128, AES_192, AES_256 } |
The Aes enum AES Level AES Levels The class supports all AES key lenghts. More... | |
enum | Mode { ECB, CBC, CFB, OFB } |
The Mode enum AES Mode The class supports the following operating modes ECB CBC CFB OFB. More... | |
enum | Padding { ZERO, PKCS7, ISO } |
The Padding enum Padding By default the padding method is ISO, however, the class supports: More... | |
Public Member Functions | |
QAESEncryption (QAESEncryption::Aes level, QAESEncryption::Mode mode, QAESEncryption::Padding padding=QAESEncryption::ISO) | |
QByteArray | encode (const QByteArray &rawText, const QByteArray &key, const QByteArray &iv=NULL) |
encode Encodes data with AES More... | |
QByteArray | decode (const QByteArray &rawText, const QByteArray &key, const QByteArray &iv=NULL) |
decode Decodes data with AES More... | |
QByteArray | removePadding (const QByteArray &rawText) |
RemovePadding Removes padding. More... | |
QByteArray | expandKey (const QByteArray &key) |
ExpandKey Expands the key. More... | |
Static Public Member Functions | |
static QByteArray | Crypt (QAESEncryption::Aes level, QAESEncryption::Mode mode, const QByteArray &rawText, const QByteArray &key, const QByteArray &iv=NULL, QAESEncryption::Padding padding=QAESEncryption::ISO) |
Crypt Static encode function. More... | |
static QByteArray | Decrypt (QAESEncryption::Aes level, QAESEncryption::Mode mode, const QByteArray &rawText, const QByteArray &key, const QByteArray &iv=NULL, QAESEncryption::Padding padding=QAESEncryption::ISO) |
Decrypt Static decode function. More... | |
static QByteArray | ExpandKey (QAESEncryption::Aes level, QAESEncryption::Mode mode, const QByteArray &key) |
ExpandKey Expands the key. More... | |
static QByteArray | RemovePadding (const QByteArray &rawText, QAESEncryption::Padding padding) |
RemovePadding Removes padding. More... | |
The QAESEncryption class Small and portable AES encryption class for Qt. Supports all key sizes - 128/192/256 bits - ECB, CBC, CFB and OFB modes. Class made entirely by bricke. Github: https://github.com/bricke/Qt-AES.
Definition at line 14 of file qaesencryption.h.
enum QAESEncryption::Aes |
The Aes enum AES Level AES Levels The class supports all AES key lenghts.
AES_128 AES_192 AES_256
Enumerator | |
---|---|
AES_128 | |
AES_192 | |
AES_256 |
Definition at line 27 of file qaesencryption.h.
enum QAESEncryption::Mode |
The Mode enum AES Mode The class supports the following operating modes ECB CBC CFB OFB.
Enumerator | |
---|---|
ECB | |
CBC | |
CFB | |
OFB |
Definition at line 40 of file qaesencryption.h.
The Padding enum Padding By default the padding method is ISO, however, the class supports:
ZERO PKCS7 ISO
Enumerator | |
---|---|
ZERO | |
PKCS7 | |
ISO |
Definition at line 55 of file qaesencryption.h.
QAESEncryption::QAESEncryption | ( | QAESEncryption::Aes | level, |
QAESEncryption::Mode | mode, | ||
QAESEncryption::Padding | padding = QAESEncryption::ISO |
||
) |
|
static |
Crypt Static encode function.
level | AES level of encryption |
mode | AES mode |
rawText | Input data |
key | Key for encrytion |
iv | IV vector |
padding | Padding |
Definition at line 6 of file qaesencryption.cpp.
QByteArray QAESEncryption::decode | ( | const QByteArray & | rawText, |
const QByteArray & | key, | ||
const QByteArray & | iv = NULL |
||
) |
decode Decodes data with AES
rawText | Input data |
key | Key |
iv | IV vector |
Definition at line 441 of file qaesencryption.cpp.
|
static |
Decrypt Static decode function.
level | AES level of encryption |
mode | AES mode |
rawText | Encrypted data |
key | Key for encrytion |
iv | IV vector |
padding | Padding |
Definition at line 12 of file qaesencryption.cpp.
QByteArray QAESEncryption::encode | ( | const QByteArray & | rawText, |
const QByteArray & | key, | ||
const QByteArray & | iv = NULL |
||
) |
encode Encodes data with AES
rawText | Input data |
key | Key |
iv | IV vector |
Definition at line 391 of file qaesencryption.cpp.
|
static |
ExpandKey Expands the key.
level | AES level |
mode | AES Mode |
key | key |
Definition at line 18 of file qaesencryption.cpp.
QByteArray QAESEncryption::expandKey | ( | const QByteArray & | key | ) |
ExpandKey Expands the key.
key | key |
Definition at line 132 of file qaesencryption.cpp.
|
static |
RemovePadding Removes padding.
rawText | Input data |
padding | Padding |
Definition at line 23 of file qaesencryption.cpp.
QByteArray QAESEncryption::removePadding | ( | const QByteArray & | rawText | ) |
RemovePadding Removes padding.
rawText | Input data |
Definition at line 490 of file qaesencryption.cpp.