summaryrefslogtreecommitdiff
path: root/Database/dbmain.php
diff options
context:
space:
mode:
Diffstat (limited to 'Database/dbmain.php')
-rw-r--r--Database/dbmain.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/Database/dbmain.php b/Database/dbmain.php
index 4e1f7aa..aeecde2 100644
--- a/Database/dbmain.php
+++ b/Database/dbmain.php
@@ -149,7 +149,7 @@ class DbMain {
$res = $this->conn->prepare($reqInitDb);
$res->execute();
}
-
+
// Sélection de la DB
private function select_db() {
$reqSelectDb = "USE ".$this->database;
@@ -191,10 +191,10 @@ class DbMain {
// Chiffre la data reçue
// https://www.delftstack.com/fr/howto/php/php-string-concatenation/
final public function crypt_pass($pass) {
- // On génère une chaine de caractère aléatoire de 16 bytes en supprimant les caractères spéciaux de base64.
+ // On génère une chaine de caractère aléatoire de 16 bytes en supprimant les caractères spéciaux de base64.
$salt = substr(str_replace("+", ".", base64_encode(random_bytes(32))), 0, 16);
// On configure pour avoir du SHA512 avec 10 000 tours (protection contre du bruteforce ex:hashcat)
- $hash = crypt($pass, '$6'.'$rounds=10000'.'$'.$salt.'$');
+ $hash = crypt($pass, '$6'.'$rounds=10000'.'$'.$salt.'$');
return $hash;
}
@@ -211,7 +211,7 @@ class DbMain {
final public function check_exist_email($email) {
$reqCheckEmailExist = "SELECT EXISTS(SELECT * FROM ".$this->tableUserAccount." WHERE email = ?)";
$data = $this->exec_cmd($reqCheckEmailExist, array($email))->fetchAll(PDO::FETCH_NUM);
- // Retourne 1 si existe, sinon 0
+ // Retourne 1 si existe, sinon 0
return $data[0][0];
}