2 /*------begin------ This protection code was suggested by Luki R. luki@karet.org ---- */
3 if (eregi("inc_init_crypt.php",$PHP_SELF))
4 die('<meta http-equiv="refresh" content="0; url=../">');
8 * This initializes the hcemd5 crypt function
13 srand((double)microtime()*32767);
14 $rand = rand(1, 32767);
15 return pack('i*', $rand);
19 * NOTE!!! The variable declarations for the chaining keys were moved
20 * to the inc_init_main.php script since beta 1.0.04.
21 * If you want to manually change the
22 * keys please open the inc_init_main.php script.
25 /*if(defined('FROM_ROOT')&&FROM_ROOT==1)
27 include_once($root_path.'classes/pear/crypt/hcemd5.php');
28 include_once($root_path.'include/inc_init_main.php'); // This loads the chaining keys
32 include_once($root_path.'classes/pear/crypt/hcemd5.php');
33 include_once($root_path.'include/inc_init_main.php'); // This loads the chaining keys
38 * The INIT_DECODE must be defined at the calling script before including this script
39 * INIT_DECODE=1 // will not start creation of random key and create decoder object
40 * INIT_DECODE= undefined or not 1 // will start creation of random key and create encoder object
42 if(defined('INIT_DECODE')&&INIT_DECODE
==1)
44 $dec_hcemd5 = new Crypt_HCEMD5($key, '');
48 $enc_hcemd5 = new Crypt_HCEMD5($key, makeRand());