Viewing file: class.encriptacion.php (1.41 KB) -rw-rw-r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php // depende de encdec.php class encriptacion { public $base; public $tim; public $ver; public $task; public $params; public $cadenaplana; private $key="w2kpro"; function __construct($ver,$tim,$task,$params){ $this->cadenaplana="$ver-$task-$params-$tim"; $enc=new encdec(); $this->base=$enc->encrypt($this->cadenaplana,$this->key); unset ($enc); $enc=new encdec(); $this->tim=$enc->encrypt($tim,$this->key); unset ($enc); $enc=new encdec(); $this->ver=$enc->encrypt($ver,$this->key); unset ($enc); $enc=new encdec(); $this->params=$enc->encrypt($params,$this->key); unset ($enc); $enc=new encdec(); $this->task=$enc->encrypt($task,$this->key); unset ($enc); } }
class desencriptacion { public $base; public $tim; public $ver; public $task; public $params; public $cadenaplana; private $key="w2kpro"; function __construct($ver,$base,$tim,$task,$params){ $enc=new encdec(); $this->cadenaplana=$enc->decrypt($base,$this->key); unset ($enc); $enc=new encdec(); $this->tim=$enc->decrypt($tim,$this->key); unset ($enc); $enc=new encdec(); $this->ver=$enc->decrypt($ver,$this->key); unset ($enc); $enc=new encdec(); $this->params=$enc->decrypt($params,$this->key); unset ($enc); $enc=new encdec(); $this->task=$enc->decrypt($task,$this->key); unset ($enc); } } ?>
|