161 questions
3 votes
2 answers
753 views
How to prevent null bytes from being passed to Bcrypt (password_hash)?
I have a script that creates a secure token for browser login remember-me like so: $token = random_bytes(32); This is then saved to a database for comparison later on: $sql = " INSERT INTO ...
-1 votes
0 answers
188 views
Argon2i password hash algorithm is not working in php?
I am learning api development with php now. While experimenting the password hashing i came up with a problem. Initally i used bcrypt algorithm, it successfully works, but when i tried Argon2i or ...
0 votes
0 answers
29 views
Hashed Password from Registration Does Not Work in Login [duplicate]
So I have created typical registration/login screens for my project. The registration part appears to be flawless, works like a charm. The password that the user inserts gets hashed into the database, ...
-2 votes
1 answer
236 views
Displaying non hashed password from database [duplicate]
<?php if(isset($_GET['edit_user'])){ $the_user_id = $_GET['edit_user']; $query = "SELECT * FROM users WHERE user_id = $the_user_id "; $select_user_by_id = mysqli_query($connection, $...
1 vote
0 answers
257 views
Object of class Symfony\Component\PasswordHasher\Hasher\UserPasswordHasher could not be converted to string
I want generate faker users with symfony with Datafixtures and I hash users password with "UserPasswordHasher" but when I run the command " php bin/console doctrine:fixtures:load" ...
2 votes
1 answer
121 views
PHP Password Hash Verifies on Hash Creation but Fails Verification with MySQL Query
I am building a dashboard system, with Apache running on a raspberry pi, and pre-generating a password and its hash for all new users. The line I used to do this is password_hash('Password1@', ...
0 votes
1 answer
110 views
PHP - password_hash() Doesn't return anything after using ROT13
In my php file I have 3 variables, one that includes the clear password and one that includes the clear password after reversed from the ROT13 encryption and my last variable that contains the hashed ...
0 votes
1 answer
974 views
Hashing and verifying user in login form PHP [duplicate]
I've created a simple login/registration form. The registered information is stored in a .txt file (this is for educational purposes only not real use). I am hashing the registered input before I put ...
0 votes
0 answers
29 views
password_verify() how does it work with same password? [duplicate]
I'm wondering, if two users in the database have the same password, the password_hash() will create two different hashes, is that right? And if so, how does it do it? And how does it work with ...
0 votes
0 answers
177 views
Problems in password_verify() and password_hash(BCRYPT)
So I was making a login system with MySQL and PHP and found out about the password_hash() and password_verify() functions. Then, just for satisfaction, I tried it on paiza.io and it worked fine. Then, ...
0 votes
2 answers
3k views
Query builder update() codeigniter 4 not updateing my password
i'd like to ask some question. I want to make a change password feature in codeigniter 4, so i have to updateing my old password, but when i do that, the password it's not updated, but all my ...
-1 votes
1 answer
120 views
Password Hashing and Password Verifying [duplicate]
I hashed a password through $hashedpassword = password_hash($Password, PASSWORD_DEFAULT); This stores the password as a hashed value into a database. But when I try to login in through $Password=$...
1 vote
0 answers
492 views
Password_verify fails for password created on another server
I recently had to import mysql backup database to another server. My problem is the password_verify() function it fails to verify the password when I login. The php version of the both servers isPHP 7....
4 votes
2 answers
6k views
PHP Warning: Use of undefined constant PASSWORD_ARGON2ID when using password_hash() in php 7.3
I recently installed PHP 7.3.6 through Plesk's web GUI for a development copy of a web app, as I intend to update our production environment from php 7.0 to 7.3. I decided to take the opportunity to ...
0 votes
1 answer
860 views
php password_hash() non used characters
Is there a list of characters not used to generate the hash in PHP's password_hash()? I'm looking for a quick/cheap way of indicating which proprietary algorythm or standard password_hash() was used ...