includes/rijndael.php
changeset 40 723bb7acf914
parent 1 fe660c52c48f
child 42 45ebe475ff75
equal deleted inserted replaced
39:c83ff194977a 40:723bb7acf914
   911   
   911   
   912   function prepare_string($text)
   912   function prepare_string($text)
   913   {
   913   {
   914     $ret = $this->hexToByteArray($this->strtohex($text));
   914     $ret = $this->hexToByteArray($this->strtohex($text));
   915     if(count($ret) != strlen($text))
   915     if(count($ret) != strlen($text))
   916       die('problem seems to be the hex conversion');
   916     {
       
   917       die('Could not convert string "' . $text . '" to hex byte array for encryption');
       
   918     }
   917     return $ret;
   919     return $ret;
   918   }
   920   }
   919   
   921   
   920   /**
   922   /**
   921    * Decodes a hex string.
   923    * Decodes a hex string.