Guest User

Untitled

a guest
Feb 17th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Generate a bcrypted crypt password hash</title>
  4. </head>
  5. <body>
  6. <h1>Generate a bcrypted crypt password hash</h1>
  7.  
  8. <?php
  9. if (isset($_POST['password']))
  10. {
  11. if (isset($_POST['password_repeat']))
  12. {
  13. if ($_POST['password'] == $_POST['password_repeat'])
  14. {
  15. echo "Crypted password:<br />".password_hash($_POST['password'], PASSWORD_BCRYPT, array('cost' => 15));
  16. }
  17. else
  18. {
  19. echo "Entered passwords didn't match!</b>\n";
  20. }
  21. }
  22. }
  23. ?>
  24.  
  25. <p>
  26. <form method="post">
  27. Password: <input type="password" name="password" size=20 /><br />
  28. Repeat: <input type="password" name="password_repeat" size=20 /><br />
  29. <input type="submit" name="submit" value="Generate hash" />
  30. </form>
  31. </p>
  32. </body>
  33. </html>
Add Comment
Please, Sign In to add comment