1
2<?php
3$hash = password_hash('rasmuslerdorf');
4// the password_hash function will encrypt the password into a 60 character string
5if (password_verify('rasmuslerdorf', $hash)) {
6 echo 'Password is valid!';
7} else {
8 echo 'Invalid password.';
9}
10?>
11// the only to decrypt is by using the password_verify() function
12
1$password = ;LULPassword342';
2$hashedPassword = 'dasasdfjkl;asdfiojadfasdasdfasdfsda23412342345@#!$df';//hash
3$passwordCheck = password_verify($password,$hashedPassword);