Example #1
0
 public static function decrypte($Texte, $Cle)
 {
     $Texte = FoxFWCrypte::generationCle(base64_decode($Texte), $Cle);
     $VariableTemp = "";
     for ($Ctr = 0; $Ctr < strlen($Texte); $Ctr++) {
         $md5 = substr($Texte, $Ctr, 1);
         $Ctr++;
         $VariableTemp .= substr($Texte, $Ctr, 1) ^ $md5;
     }
     return $VariableTemp;
 }
Example #2
0
 public function setPassword($password)
 {
     $this->change = true;
     $password = htmlspecialchars($password);
     $this->orm->password = FoxFWCrypte::crypte($password, $this->orm->clef);
 }
Example #3
0
 public static function getTokenPost()
 {
     $tab = array();
     $tab['token'] = $_SESSION['form_token'];
     //si le joueur n'st pas co, on met ca clef qui change a toute les pages
     $tab['clef'] = $GLOBALS['User']->getClef();
     if ($GLOBALS['User']->isLogin()) {
         $tab['clef'] = FoxFWCrypte::crypte($tab['clef'], $_SESSION['form_token']);
     }
     return $tab;
 }