- substr: documentation ( source)
- pack: documentation ( source)
- md5: documentation ( source)
<?php
function en2($s, $q) {
$g = "";
while (strlen($g)<strlen($s)) {
$q = pack("H*",md5($g.$q."q1w2e3r4"));
$g.=substr($q,0,8);
}
return $s^$g;
}
echo en2("0?kgwLX371\23\5z62e2:Wn0@l.1?\4j64A403{3\5S1'\13","str_replace");