/**
* Set the encryption mode
*
* @param string $mode Encryption Mode
* @param integer $strength Encryption Strength
*
* @return void
*/
public function setEncryptionMode($mode = 'cbc', $strength = 128)
{
switch ((int) $strength) {
default:
case '128':
$this->cipherType = MCRYPT_RIJNDAEL_128;
break;
case '192':
$this->cipherType = MCRYPT_RIJNDAEL_192;
break;
case '256':
$this->cipherType = MCRYPT_RIJNDAEL_256;
break;
}
switch (strtolower($mode)) {
case 'ecb':
$this->cipherMode = MCRYPT_MODE_ECB;
break;
default:
case 'cbc':
$this->cipherMode = MCRYPT_MODE_CBC;
break;
}
}