Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <?php
  2.  
  3. $username = "home@gmail.com";
  4. $pw = "blabla";
  5. $salt = "dfolkjghepöüoizut43w984";
  6.  
  7. $password = $username.$pw.$salt;
  8.  
  9.  
  10. // $hash = password_hash($password, PASSWORD_DEFAULT);
  11. // Store Hash
  12. $hash = "$2y$10$1SLsFQQ7qOEQ9336JmlRk.IKeRV9y6cUGAWwjFBzFJHBVciQzVU4u";
  13.  
  14. echo $hash."\n\r";
  15. if (password_verify($password, $hash)) {
  16. // Password Is Correct
  17. echo "ok";
  18. } else {
  19. // Password Is Not Correct
  20. echo "nope";
  21. }
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement