Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- echo better_crypt("password");
- if(password_verify("password", better_crypt("password"))) {
- // password is correct
- echo "<br><br>";
- echo "password correct";
- }
- function better_crypt($input, $rounds = 8)
- {
- // Original PHP code by Chirp Internet: www.chirp.com.au
- // Please acknowledge use of this code by including this header.
- $crypt_options = array(
- 'cost' => $rounds
- );
- return password_hash($input, PASSWORD_BCRYPT, $crypt_options);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement