Open Imikeeee opened 4 years ago
See https://github.com/mariofont/PHP-Login/issues/3#issuecomment-640791054
Use the PHP method
password_hash()
- see https://www.php.net/manual/en/function.password-hash.php.Example:
$var = 'my-password'; $hash = password_hash($var, PASSWORD_DEFAULT);
I writed this on the config.php: echo password_hash("root1337", PASSWORD_DEFAULT); and i got this : $2y$10$HK8Fp4uiX2Rybd6jNeGVZOqZ.f/.lIX5ruonDxGR6cJc9JsEF3BQK
and i also changed the usernamte to : root
and i still cant login ;-;
the login.php said : Warning! Incorrect information.
my config.php looks like :
<?php / Define username and password / $Username = "root"; $Password = "$2y$10$HK8Fp4uiX2Rybd6jNeGVZOqZ.f/.lIX5ruonDxGR6cJc9JsEF3BQK"; //$Password = "$2y$10$1GmNO63bbKWpaPxcqLaLW.yVmvoxyOD9krWXxn2XAY.QSdbfcARDK"; //echo password_hash("root1337", PASSWORD_DEFAULT); ?>
for those looking for help
How can i make a new password? What is the default password hash type?