phpass

Can I access /dev/urandom with open_basedir in effect?

这一生的挚爱 提交于 2019-11-30 13:08:08
I want to use phpass-0.3 in Codeigniter, but I get the following error due to open_basedir : A PHP Error was encountered Severity: Warning Message: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s): (/home/phginep:/usr/lib/php:/usr/local/lib/php:/tmp) Filename: phpass-0.3/PasswordHash.php Line Number: 51 Following code: function get_random_bytes($count) { $output = ''; if (is_readable('/dev/urandom') && //Line Number: 51 ($fh = @fopen('/dev/urandom', 'rb'))) { $output = fread($fh, $count); fclose($fh); } if (strlen(

Portable (PHPass) password hashes. Should I use them?

ぃ、小莉子 提交于 2019-11-28 03:36:15
I'm installing a user registration script (Tank Auth) for my website. In the installation guide its says, WARNING: By default the library generates strong system-specific password hashes that are not portable. It means that once created, user database cannot be dumped and exported to another server. This behavior can be changed in config-file as well. This put me in a dilemma. In the future I may want to change servers but I don't want weak passwords either. Are portable password hashes a big risk? And more importantly, what do they mean by hashes? Is it the character length? Task Auth uses