OKlibrary  0.2.1.6
OKlib::Rijndael::Rijndael Class Reference

#include <rijndael.hpp>

List of all members.

Public Types

enum  Direction { Encrypt, Decrypt }
enum  Mode { ECB, CBC, CFB1 }
enum  KeyLength { Key16Bytes, Key24Bytes, Key32Bytes }

Public Member Functions

 Rijndael ()
 ~Rijndael ()
int init (Mode mode, Direction dir, const UInt8 *key, KeyLength keyLen, UInt8 *initVector=0)
int blockEncrypt (const UInt8 *input, int inputLen, UInt8 *outBuffer)
int padEncrypt (const UInt8 *input, int inputOctets, UInt8 *outBuffer)
int blockDecrypt (const UInt8 *input, int inputLen, UInt8 *outBuffer)
int padDecrypt (const UInt8 *input, int inputOctets, UInt8 *outBuffer)

Protected Types

enum  State { Valid, Invalid }

Protected Member Functions

void keySched (UInt8 key[max_key_columns][4])
void keyEncToDec ()
void encrypt (const UInt8 a[16], UInt8 b[16])
void decrypt (const UInt8 a[16], UInt8 b[16])

Protected Attributes

State m_state
Mode m_mode
Direction m_direction
UInt8 m_initVector [max_iv_size]
UInt32 m_uRounds
UInt8 m_expandedKey [max_rounds+1][4][4]

Detailed Description

Definition at line 97 of file rijndael.hpp.


Member Enumeration Documentation

Enumerator:
Encrypt 
Decrypt 

Definition at line 100 of file rijndael.hpp.

Enumerator:
Key16Bytes 
Key24Bytes 
Key32Bytes 

Definition at line 102 of file rijndael.hpp.

Enumerator:
ECB 
CBC 
CFB1 

Definition at line 101 of file rijndael.hpp.

Enumerator:
Valid 
Invalid 

Definition at line 111 of file rijndael.hpp.


Constructor & Destructor Documentation

Definition at line 980 of file rijndael.cpp.

Definition at line 985 of file rijndael.cpp.


Member Function Documentation

int OKlib::Rijndael::Rijndael::blockDecrypt ( const UInt8 input,
int  inputLen,
UInt8 outBuffer 
)
int OKlib::Rijndael::Rijndael::blockEncrypt ( const UInt8 input,
int  inputLen,
UInt8 outBuffer 
)
void OKlib::Rijndael::Rijndael::decrypt ( const UInt8  a[16],
UInt8  b[16] 
) [protected]

Definition at line 1563 of file rijndael.cpp.

void OKlib::Rijndael::Rijndael::encrypt ( const UInt8  a[16],
UInt8  b[16] 
) [protected]

Definition at line 1489 of file rijndael.cpp.

Definition at line 1472 of file rijndael.cpp.

void OKlib::Rijndael::Rijndael::keySched ( UInt8  key[max_key_columns][4]) [protected]

Definition at line 1394 of file rijndael.cpp.

References OKlib::Rijndael::max_key_columns, and S.

int OKlib::Rijndael::Rijndael::padEncrypt ( const UInt8 input,
int  inputOctets,
UInt8 outBuffer 
)

Definition at line 1149 of file rijndael.cpp.

References OKlib::Rijndael::rijndael_not_initialized.


Member Data Documentation

Definition at line 115 of file rijndael.hpp.

Definition at line 118 of file rijndael.hpp.

Definition at line 116 of file rijndael.hpp.

Definition at line 114 of file rijndael.hpp.

Definition at line 113 of file rijndael.hpp.

Definition at line 117 of file rijndael.hpp.


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