//Define the key for Rijndael (AES) encryption algorithm
char key[CRijndael::DEFAULTKEYSIZE] =
{
'v','e','r','y','l','o','n','g',
'p','a','s','s','w','o','r','d'
};
//Define the block for Rijndael (AES) encryption algorithm
unsigned char block[CRIJNDAEL::BLOCKSIZE] =
{
0x8C, 0x5B, 0x3C, 0x42, 0xDE, 0xB1, 0x11, 0xA0,
0x42, 0xE7, 0x29, 0xC0, 0x41, 0x9D, 0x09, 0xE1
};
//Declare a CRijndael object
CRijndael cipher( SLC_ENCRYPT, (const unsigned char*)key );
//Encrypt the block
cipher.ProcessBlock( block ); //in-place encryption
//Change chipher direction to perform decryption
cipher.Init( SLC_DECRYPT, (const unsigned char*)key );
//Decrypt the block
cipher.ProcessBlock( block ); //in-place decryption
|