Hi,
Which PHP function can I use to do encryption and decryption of a password? It should be unique and reversible.
Thank you.
Kind regards,
j
Moderators: macek, egami, gesf

<?php
$hashed_password = crypt('mypassword'); // let the salt be automatically generated
if (crypt($user_input, $hashed_password) == $hashed_password) {
echo "Password verified!";
}
?>


Return to PHP coding => General
Users browsing this forum: No registered users and 1 guest