49 #ifndef AESENCRYPTION_H 50 #define AESENCRYPTION_H 54 #include "encryption.h" 56 #define CRC_ENCRYPT_HEADER_SIZE 12 58 #define AES_PWVERIFYSIZE (2) 59 #define AES_AUTHCODESIZE (10) 60 #define AES_MAXSALTLENGTH (16) 61 #define AES_VERSION (0x0001) 62 #define AES_ENCRYPTIONMODE (0x03) 63 #define AES_HEADERSIZE (11) 64 #define AES_KEYSIZE(mode) (64 + (mode * 64)) 75 virtual ~AesEncryption();
77 virtual bool init(
const QString& password );
79 virtual void encryptBytes(
char* buffer, qint64 read);
80 virtual void decryptBytes(
char* buffer, qint64 read);
82 virtual bool decryptHeader(QIODevice* ioDevice,
const QString& password, quint16 crc );
83 virtual qint32 encryptHeader(QIODevice* ioDevice,
const QString& password, quint16 crc );
85 virtual qint32 decryptFooter(QIODevice* ioDevice, quint16 crc );
86 virtual qint32 encryptFooter(QIODevice* ioDevice );
88 virtual qint32 size(){
return headerSize; }
95 unsigned char passverify[AES_PWVERIFYSIZE];
96 unsigned char saltvalue[AES_MAXSALTLENGTH];
106 #endif // CRCENCRYPTION_H
Definition: encryption.h:40