original_string: public function encrypt($string)
      {
          $td = mcrypt_module_open($this->cypher, '', $this->mode, '');
          $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), mcrypt_RAND);
          mcrypt_generic_init($td, $this->key, $iv);
          $encrypted = mcrypt_generic($td, $string);
          mcrypt_generic_deinit($td);
  
          return $iv.$encrypted;
      }
code: public function encrypt($string)
      {
          $td = mcrypt_module_open($this->cypher, '', $this->mode, '');
          $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), mcrypt_RAND);
          mcrypt_generic_init($td, $this->key, $iv);
          $encrypted = mcrypt_generic($td, $string);
          mcrypt_generic_deinit($td);
  
          return $iv.$encrypted;
      }
code_tokens: public function encrypt ( $ string ) { $ td = mcrypt_module_open ( $ this -> cypher , '' , $ this -> mode , '' ) ; $ iv = mcrypt_create_iv ( mcrypt_enc_get_iv_size ( $ td ) , mcrypt_RAND ) ; mcrypt_generic_init ( $ td , $ this -> key , $ iv ) ; $ encrypted = mcrypt_generic ( $ td , $ string ) ; mcrypt_generic_deinit ( $ td ) ; return $ iv . $ encrypted ; }
docstring: Encrypts a string
  @param $string The string of data to encrypt
docstring_tokens: Encrypts a string