Ejemplo n.º 1
0
 /**
  * This function deinitializes an encryption module
  *
  * This function terminates encryption specified by the encryption descriptor (td).
  * It clears all buffers, but does not close the module. You need to call
  * mcrypt_module_close() yourself. (But PHP does this for you at the end of the 
  * script.)
  *
  * @param \phpseclib\Crypt\Base $td
  * @return bool
  * @access public
  */
 function phpseclib_mcrypt_generic_deinit(Base $td)
 {
     if (!isset($td->mcrypt_polyfill_init)) {
         trigger_error('mcrypt_generic_deinit(): Could not terminate encryption specifier', E_USER_WARNING);
         return false;
     }
     $td->disableContinuousBuffer();
     unset($td->mcrypt_polyfill_init);
     return true;
 }