Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?PHP
  2. echo better_crypt("password");
  3. if(password_verify("password", better_crypt("password"))) {
  4. // password is correct
  5. echo "<br><br>";
  6. echo "password correct";
  7. }
  8.  
  9. function better_crypt($input, $rounds = 8)
  10. {
  11. // Original PHP code by Chirp Internet: www.chirp.com.au
  12. // Please acknowledge use of this code by including this header.
  13. $crypt_options = array(
  14. 'cost' => $rounds
  15. );
  16. return password_hash($input, PASSWORD_BCRYPT, $crypt_options);
  17. }
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement