$salt = '$2y$10$' . mcrypt_create_iv(22);
$salted_password = crypt($password, $salt);
Yes, I remember because I had to port a similar algorithm in Java and it was like 200 lines of code vs this one!
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.