PictureCrypt  1.4.1
An image-steganography project
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
QAESEncryption Class Reference

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>

Inheritance diagram for QAESEncryption:
Inheritance graph
[legend]
Collaboration diagram for QAESEncryption:
Collaboration graph
[legend]

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

Detailed Description

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.

Author
Bricke (Matteo B)

Definition at line 14 of file qaesencryption.h.

Member Enumeration Documentation

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.

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.

Constructor & Destructor Documentation

QAESEncryption::QAESEncryption ( QAESEncryption::Aes  level,
QAESEncryption::Mode  mode,
QAESEncryption::Padding  padding = QAESEncryption::ISO 
)

Definition at line 67 of file qaesencryption.cpp.

Here is the caller graph for this function:

Member Function Documentation

QByteArray QAESEncryption::Crypt ( QAESEncryption::Aes  level,
QAESEncryption::Mode  mode,
const QByteArray &  rawText,
const QByteArray &  key,
const QByteArray &  iv = NULL,
QAESEncryption::Padding  padding = QAESEncryption::ISO 
)
static

Crypt Static encode function.

Parameters
levelAES level of encryption
modeAES mode
rawTextInput data
keyKey for encrytion
ivIV vector
paddingPadding
Returns
Returns encrypted data
See also
QAESEncryption::encode, QAESEncryption::Decrypt

Definition at line 6 of file qaesencryption.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QByteArray QAESEncryption::decode ( const QByteArray &  rawText,
const QByteArray &  key,
const QByteArray &  iv = NULL 
)

decode Decodes data with AES

Note
Basically the non-static method of QAESEncryption::Decrypt
Parameters
rawTextInput data
keyKey
ivIV vector
Returns
Returns decoded data
See also
QAESEncryption::Decrypt, QAESEncryption::encode

Definition at line 441 of file qaesencryption.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QByteArray QAESEncryption::Decrypt ( QAESEncryption::Aes  level,
QAESEncryption::Mode  mode,
const QByteArray &  rawText,
const QByteArray &  key,
const QByteArray &  iv = NULL,
QAESEncryption::Padding  padding = QAESEncryption::ISO 
)
static

Decrypt Static decode function.

Parameters
levelAES level of encryption
modeAES mode
rawTextEncrypted data
keyKey for encrytion
ivIV vector
paddingPadding
Returns
Returns Decrypted data
See also
QAESEncryption::decode, QAESEncryption::Crypt

Definition at line 12 of file qaesencryption.cpp.

Here is the call graph for this function:

QByteArray QAESEncryption::encode ( const QByteArray &  rawText,
const QByteArray &  key,
const QByteArray &  iv = NULL 
)

encode Encodes data with AES

Note
Basically the non-static method of QAESEncryption::Crypt
Parameters
rawTextInput data
keyKey
ivIV vector
Returns
Returns encoded data
See also
QAESEncryption::Crypt, QAESEncryption::decode

Definition at line 391 of file qaesencryption.cpp.

Here is the call graph for this function:

QByteArray QAESEncryption::ExpandKey ( QAESEncryption::Aes  level,
QAESEncryption::Mode  mode,
const QByteArray &  key 
)
static

ExpandKey Expands the key.

Parameters
levelAES level
modeAES Mode
keykey
Returns
Returns expanded key (I guess)
See also
QAESEncryption::expandKey

Definition at line 18 of file qaesencryption.cpp.

Here is the call graph for this function:

QByteArray QAESEncryption::expandKey ( const QByteArray &  key)

ExpandKey Expands the key.

Note
Basically the non-static method of QAESEncryption::ExpandKey
Parameters
keykey
Returns
Returns expanded key (I guess)
See also
QAESEncryption::ExpandKey

Definition at line 132 of file qaesencryption.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QByteArray QAESEncryption::RemovePadding ( const QByteArray &  rawText,
QAESEncryption::Padding  padding 
)
static

RemovePadding Removes padding.

Parameters
rawTextInput data
paddingPadding
Returns
Returns data with removed padding (I guess)
See also
QAESEncryption::removePadding

Definition at line 23 of file qaesencryption.cpp.

QByteArray QAESEncryption::removePadding ( const QByteArray &  rawText)

RemovePadding Removes padding.

Note
Basically the non-static method of QAESEncryption::RemovePadding
Parameters
rawTextInput data
Returns
Returns data with removed padding (I guess)
See also
QAESEncryption::RemovePadding

Definition at line 490 of file qaesencryption.cpp.


The documentation for this class was generated from the following files: