PHP in Visual Studio Code: How to REHASH a Password

Published: 01 January 1970
on channel: Tech VideoStack
417
1

Note: To be able to continue with this tutorial, you must be familiar with the password hashing in PHP. If you are not, then you can watch my video on Password hashing and verification:    • PHP in Visual Studio Code: PASSWORD h...  

In this tutorial you will learn how to rehash a password in PHP. As always, we use Visual Studio Code as or PHP code editor.

Rehashing of a password is done, for example, when you have decided to change the way your password is encrypted in the database, usually because you want to make them more secure.

You would use the password_needs_rehash() php function to check, each time a user inputs his password.

The password_needs_rehash() checks if the password required rehashing. In a positive case, then in the if statement block you would rehash the password and then update the database.

If the password was already rehashed, the password_needs_rehash() function allows us to skip that value.

This is another tutorial on PHP security and hopefully it is useful to you.

Remember, to always stay up to date with the most recent security PHP standards.


I use Visual Studio Code or VS Code as my PHP and HTML code editor.

I use XAMPP and Chrome browser to test the results.

0:00 - Intro
0:24 - Why you need password rehashing?
1:50 - The code
5:05 - Another example
5:50 - Recap
6:25 - Outro

--------------------------------------------------------------------------------------------------------------------------
Check my other video in the following playlists:
PHP and MySQL in Visual Studio Code for Beginners: http://bit.ly/2lQUg0h
PHP, mySQL and Visual Studio Code - Short Tutorials: https://bit.ly/3ewTewV
--------------------------------------------------------------------------------------------------------------------------


►► Follow us:
Facebook:   / techvideostack  
Instagram:   / techvideostack  
Twitter:   / stackvideo  
Pixabay: https://pixabay.com/users/techvideost...

❓ You have any QUESTION? - Leave them in the comments section below.

Thanks for watching

#PasswordRehash #PHP #VSCode