I have just started learning PHP and I want to create a website with a login for my final year university project. I've read that blowfish is the best method for hashing in a number of places like here: openssl_digest vs hash vs hash_hmac? Difference between SALT & HMAC?
Everywhere I read about the crypt method includes a string like $2y$07$usesomesillystringforsalt$
My main question is: how do I randomly generate this? I've read in places that time stamps and mt_rand() are not secure.
Also I've heard AES is the preferred technology recently but from what I can see it seems pretty tricky to implement in PHP! Is blowfish still an acceptable method to secure stored passwords?
$algo$cost$salt$
where salt is its perfectly safe to use microtime affixed with your domain name sha1'ndsubstr(salt,0,21)
as anymore then 21 chars will be dropped. Perhaps something I made early will interest you php-pdo-secure-login-script-example – Abigael