Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
73
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. $pass = "password123";
  4. $activationToken = bin2hex(random_bytes(16));
  5. $salt = bin2hex(random_bytes(16));
  6. $hash = hash_pbkdf2("sha512", $pass, $salt, 262144);
  7.  
  8. echo "The following values are good for SALT and ACTIVATION that are CHAR(32) data, and HASH that is CHAR(128) data.";
  9.  
  10. echo "password: " . $pass . "\n\n";
  11. echo "activation token" . $activationToken . "\n\n";
  12. echo "salt: " . $salt . "\n\n";
  13. echo "password hash: " . $hash . "\n\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement