15#ifndef _PDF_RIJNDAEL_H_
16#define _PDF_RIJNDAEL_H_
76#define _MAX_KEY_COLUMNS (256/32)
81typedef unsigned char UINT8;
82typedef unsigned int UINT32;
83typedef unsigned short UINT16;
86#define RIJNDAEL_SUCCESS 0
87#define RIJNDAEL_UNSUPPORTED_MODE -1
88#define RIJNDAEL_UNSUPPORTED_DIRECTION -2
89#define RIJNDAEL_UNSUPPORTED_KEY_LENGTH -3
90#define RIJNDAEL_BAD_KEY -4
91#define RIJNDAEL_NOT_INITIALIZED -5
92#define RIJNDAEL_BAD_DIRECTION -6
93#define RIJNDAEL_CORRUPTED_DATA -7
106 enum Direction { Encrypt , Decrypt };
107 enum Mode { ECB , CBC , CFB1 };
108 enum KeyLength { Key16Bytes , Key24Bytes , Key32Bytes };
117 enum State { Valid , Invalid };
121 Direction m_direction;
122 UINT8 m_initVector[MAX_IV_SIZE];
124 UINT8 m_expandedKey[_MAX_ROUNDS+1][4][4];
144 int init(Mode mode,Direction dir,
const UINT8 *
key,KeyLength keyLen,UINT8 * initVector = 0);
152 int blockEncrypt(
const UINT8 *input,
int inputLen, UINT8 *outBuffer);
158 int padEncrypt(
const UINT8 *input,
int inputOctets, UINT8 *outBuffer);
163 int blockDecrypt(
const UINT8 *input,
int inputLen, UINT8 *outBuffer);
168 int padDecrypt(
const UINT8 *input,
int inputOctets, UINT8 *outBuffer);
170 void keySched(UINT8
key[_MAX_KEY_COLUMNS][4]);
172 void encrypt(
const UINT8 a[16], UINT8 b[16]);
173 void decrypt(
const UINT8 a[16], UINT8 b[16]);
Class implementing the Rijndael cipher. (For internal use only)
Definition: pdfrijndael.h:104
Compile time switches for the wxPdfDocument component.
unsigned int UINT32
A type definition for a .
Definition: structcmd.h:52