I have an app in vb.net and I want to store a password in my database that is understandable from PHP. The creation in PHP is like this:
$hash = password_hash("mypassword", PASSWORD_BCRYPT);
The result looks like this:
$hash = '$2y$07$BCryptRequires22Chrcte/VlQH0piJtjXl.0t1XkA8pw9dMXTpOq';
and the code in php to validate a password looks likethis
if (password_verify('mypassword', $hash)) {
echo 'Password is valid!';
} else {
echo 'Invalid password.';
}
How can I replicate this code
$hash = password_hash("mypassword", PASSWORD_BCRYPT);
iv VB.Net, so the results will match exactly?