Código: Seleccionar todo
<?
/********************************************
* Coded by linkgl *
* 25/02/10 *
* [email protected] *
* version beta, errores a mi correo *
* indetectables.net *
* *****************************************/
class lcrypt
{
function encript($string)
{
for($i=1;$i<strlen($string);$i++)
{
$p=substr($string,$i,1);
$c=ord($p);
if($c<=255)
{
$c=$c+1;
}
else
{
$c=$c-1;
}
$d=chr($c);
$total.=$d;
}
return $total;
}
function decript($dato)
{
for($i=1;$i<strlen($dato);$i++)
{
$p=substr($dato,$i,1);
$c=ord($p);
if($c<=255)
{
$c=$c-1;
}
else
{
$c=$c+1;
}
$d=chr($c);
$t.=$d;
}
return $t;
}
}
//uso
$st="holacomoestas";
$l=new lcrypt;
echo $l->encript($st);
?>