I hashing my password using below method in PHP
$password=hash('sha256','123');
Now i want to decode it, how it is possible? I doesn't use any key or salt.
<?php
$password=hash('sha256','123');
echo $password;
$decdoe=base64_decode($password);
echo $decdoe;
?>
base64_decoding means decrypting a file using base64 algorithm. This is called encrypting. Hashing is a different case. when hashing what you hash cannot be recreated. so the purpose of hashing is to check the integrity of a file in this case the password. that means if u hash a password at the registration u will save the hashed part in the password field as password. Now when you re check it you need to check by hashing the user input password again with the value in your database. So using this code below