diff -r 3dea509d88ae -r 84b56303cab5 includes/rijndael.php --- a/includes/rijndael.php Sat Jul 07 22:54:20 2007 -0400 +++ b/includes/rijndael.php Sat Jul 07 23:06:28 2007 -0400 @@ -744,6 +744,8 @@ function encrypt($text, $key, $return_encoding = ENC_HEX) { + if ( $text == '' ) + return ''; if ( $this->mcrypt && $this->blockSizeInBits == mcrypt_module_get_algo_block_size(eval('return MCRYPT_RIJNDAEL_'.$this->keySizeInBits.';')) ) { $iv_size = mcrypt_get_iv_size($this->mcrypt, MCRYPT_MODE_ECB); @@ -800,6 +802,8 @@ function decrypt($text, $key, $input_encoding = ENC_HEX) { + if ( $text == '' ) + return ''; switch($input_encoding) { case ENC_BINARY: @@ -997,7 +1001,8 @@ } function encrypt($str, $key) { - if ($str == "") { + if ($str == "") + { return ""; } $v = $this->str2long($str, true);