hhfa1990
8/21/2015 - 3:34 PM

php, hash, encriptar, desencriptar, pass, pasword, contraseña

php, hash, encriptar, desencriptar, pass, pasword, contraseña


//Encriptar
$hash = password_hash("my_pass", PASSWORD_DEFAULT);

//Desencriptar
if (password_verify('my_pass', $hash)) {
    echo 'Password is valid!';
} else {
    echo 'Invalid password.';
}