includes/rijndael.php
changeset 1327 e8f4dea267c8
parent 1227 bdac73ed481e
child 1330 1649f687e69e
equal deleted inserted replaced
1326:f99dfb1b0530 1327:e8f4dea267c8
  1727 		$aes_decrypt_cache = array(
  1727 		$aes_decrypt_cache = array(
  1728 			sha1($encrypted . '::' . $key) => $decrypted
  1728 			sha1($encrypted . '::' . $key) => $decrypted
  1729 		);
  1729 		);
  1730 	}
  1730 	}
  1731 	// call var_export and collect contents
  1731 	// call var_export and collect contents
  1732 	ob_start();
  1732 	$dec_cache_string = var_export($aes_decrypt_cache, true);
  1733 	var_export($aes_decrypt_cache);
       
  1734 	$dec_cache_string = ob_get_contents();
       
  1735 	ob_end_clean();
       
  1736 	$f = @fopen($cache_file, 'w');
  1733 	$f = @fopen($cache_file, 'w');
  1737 	if ( !$f )
  1734 	if ( !$f )
  1738 		return false;
  1735 		return false;
  1739 	fwrite($f, "<?php
  1736 	fwrite($f, "<?php
  1740 \$GLOBALS['aes_decrypt_cache'] = $dec_cache_string;
  1737 \$GLOBALS['aes_decrypt_cache'] = $dec_cache_string;
  1771 	
  1768 	
  1772 	if ( isset($aes_decrypt_cache[$hash]) )
  1769 	if ( isset($aes_decrypt_cache[$hash]) )
  1773 		unset($aes_decrypt_cache[$hash]);
  1770 		unset($aes_decrypt_cache[$hash]);
  1774 	
  1771 	
  1775 	// call var_export and collect contents
  1772 	// call var_export and collect contents
  1776 	ob_start();
  1773 	$dec_cache_string = var_export($aes_decrypt_cache, true);
  1777 	var_export($aes_decrypt_cache);
       
  1778 	$dec_cache_string = ob_get_contents();
       
  1779 	ob_end_clean();
       
  1780 	$f = @fopen($cache_file, 'w');
  1774 	$f = @fopen($cache_file, 'w');
  1781 	if ( !$f )
  1775 	if ( !$f )
  1782 		return false;
  1776 		return false;
  1783 	fwrite($f, "<?php
  1777 	fwrite($f, "<?php
  1784 \$GLOBALS['aes_decrypt_cache'] = $dec_cache_string;
  1778 \$GLOBALS['aes_decrypt_cache'] = $dec_cache_string;