Location: PHPKode > scripts > Solace script maze > solace-script-maze/key_word.php
// #php version 4.3.0
// #Encoder
    $s = $this->php_implode($php_array);
    $t1 = $this->table;
    do {
        $word = uniqid('m');
        $key = pack('H*', md5($word));
        $t2 = $t1;
        for ($i=0; $i<15; $i+=2) {
            $k1 = ord($key[$i]);
            $k2 = ord($key[$i+1]);
            $t2 = substr($t2, $k1, $k2).substr($t2, 0, $k1).substr($t2, $k1+$k2);
        }
        $es = strtr($s, $t1, $t2);
    } while (!$this->safe_stream($es));
    $enc['enc_data'] = $es;
    $enc['word'] = base64_encode($key);


// #Decoder
<?php {MORPH_VARS} 
    ob_start();
?>{ENC_DATA}<?php
function decode_run(&$s) {
    declare(ticks=0);
    $key = base64_decode('{WORD}');
    $t2 = $GLOBALS['V001'];
    for ($i=0; $i<15; $i+=2) {
        $k1 = ord($key[$i]);
        $k2 = ord($key[$i+1]);
        $t2 = substr($t2, $k1, $k2).substr($t2, 0, $k1).substr($t2, $k1+$k2);
    }
    return eval(strtr($s, $t2, $GLOBALS['V001']));
}
    $s = ob_get_contents();
    ob_end_clean();
    return decode_run($s);
?>

Return current item: Solace script maze