Commit b1dc1e17 authored by Bate's avatar Bate

Change hash algorithm from bcrypt to SHA-512

parent fcc20677
...@@ -551,7 +551,7 @@ class utilisateur extends stdentity ...@@ -551,7 +551,7 @@ class utilisateur extends stdentity
array("id_utilisateur" => $this->id)); array("id_utilisateur" => $this->id));
} }
} }
$this->hash = crypt(genere_pass(20), uniqid('$2y$07$', true)); $this->hash = crypt(genere_pass(20), uniqid('$6$rounds=10000$', true));
$this->tovalid = $reason; $this->tovalid = $reason;
$req = new update($this->dbrw, $req = new update($this->dbrw,
"utilisateurs", "utilisateurs",
...@@ -574,7 +574,7 @@ class utilisateur extends stdentity ...@@ -574,7 +574,7 @@ class utilisateur extends stdentity
*/ */
function change_password ( $new_password ) function change_password ( $new_password )
{ {
$this->pass = crypt($new_password, uniqid('$2y$07$', true)); $this->pass = crypt($new_password, uniqid('$6$rounds=10000$', true));
$req = new update($this->dbrw, $req = new update($this->dbrw,
"utilisateurs", "utilisateurs",
array("pass_utl"=>$this->pass), array("pass_utl"=>$this->pass),
...@@ -1200,7 +1200,7 @@ class utilisateur extends stdentity ...@@ -1200,7 +1200,7 @@ class utilisateur extends stdentity
$alias.=1; $alias.=1;
} }
$this->alias = $alias; $this->alias = $alias;
$this->pass = crypt($password, uniqid('$2y$07$', true)); $this->pass = crypt($password, uniqid('$6$rounds=10000$', true));
$this->sexe = $sexe; $this->sexe = $sexe;
$this->date_naissance = $date_naissance; $this->date_naissance = $date_naissance;
$this->droit_image = $droit_image; $this->droit_image = $droit_image;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment