OKlibrary
0.2.1.6
|
#include <rijndael.hpp>
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] |
Definition at line 97 of file rijndael.hpp.
Definition at line 100 of file rijndael.hpp.
Definition at line 102 of file rijndael.hpp.
Definition at line 101 of file rijndael.hpp.
enum OKlib::Rijndael::Rijndael::State [protected] |
Definition at line 111 of file rijndael.hpp.
Definition at line 980 of file rijndael.cpp.
Definition at line 985 of file rijndael.cpp.
int OKlib::Rijndael::Rijndael::blockDecrypt | ( | const UInt8 * | input, |
int | inputLen, | ||
UInt8 * | outBuffer | ||
) |
Definition at line 1210 of file rijndael.cpp.
References OKlib::Rijndael::rijndael_bad_direction, and OKlib::Rijndael::rijndael_not_initialized.
int OKlib::Rijndael::Rijndael::blockEncrypt | ( | const UInt8 * | input, |
int | inputLen, | ||
UInt8 * | outBuffer | ||
) |
Definition at line 1061 of file rijndael.cpp.
References OKlib::Rijndael::rijndael_bad_direction, and OKlib::Rijndael::rijndael_not_initialized.
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.
int OKlib::Rijndael::Rijndael::init | ( | Mode | mode, |
Direction | dir, | ||
const UInt8 * | key, | ||
KeyLength | keyLen, | ||
UInt8 * | initVector = 0 |
||
) |
Definition at line 990 of file rijndael.cpp.
References OKlib::Rijndael::max_iv_size, OKlib::Rijndael::max_key_columns, OKlib::Rijndael::rijndael_bad_key, OKlib::Rijndael::rijndael_success, OKlib::Rijndael::rijndael_unsupported_direction, OKlib::Rijndael::rijndael_unsupported_key_length, and OKlib::Rijndael::rijndael_unsupported_mode.
void OKlib::Rijndael::Rijndael::keyEncToDec | ( | ) | [protected] |
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::padDecrypt | ( | const UInt8 * | input, |
int | inputOctets, | ||
UInt8 * | outBuffer | ||
) |
Definition at line 1310 of file rijndael.cpp.
References OKlib::Rijndael::rijndael_bad_direction, OKlib::Rijndael::rijndael_corrupted_data, and OKlib::Rijndael::rijndael_not_initialized.
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.
Direction OKlib::Rijndael::Rijndael::m_direction [protected] |
Definition at line 115 of file rijndael.hpp.
UInt8 OKlib::Rijndael::Rijndael::m_expandedKey[max_rounds+1][4][4] [protected] |
Definition at line 118 of file rijndael.hpp.
UInt8 OKlib::Rijndael::Rijndael::m_initVector[max_iv_size] [protected] |
Definition at line 116 of file rijndael.hpp.
Mode OKlib::Rijndael::Rijndael::m_mode [protected] |
Definition at line 114 of file rijndael.hpp.
State OKlib::Rijndael::Rijndael::m_state [protected] |
Definition at line 113 of file rijndael.hpp.
UInt32 OKlib::Rijndael::Rijndael::m_uRounds [protected] |
Definition at line 117 of file rijndael.hpp.