filmov
tv
PHP in Visual Studio Code: How to REHASH a Password

Показать описание
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:
--------------------------------------------------------------------------------------------------------------------------
►► Follow us:
❓ You have any QUESTION? - Leave them in the comments section below.
Thanks for watching
#PasswordRehash #PHP #VSCode