Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $hash = hash('sha256', $password);
- function createSalt() {
- $text = md5(uniqid(rand(), true));
- return substr($text, 0, 3);
- }
- $salt = createSalt();
- $password = hash('sha256', $salt . $hash);
- $query = "INSERT INTO user ( name, login, password, email, salt ) VALUES
- ( '$name', '$login', '$password', '$email', '$salt' )";
Advertisement
Add Comment
Please, Sign In to add comment