### Eclipse Workspace Patch 1.0
#P wordpress-trunk
|
|
|
3 | 3 | * Portable PHP password hashing framework. |
4 | 4 | * @package phpass |
5 | 5 | * @since 2.5 |
6 | | * @version 0.1 |
| 6 | * @version 0.2 / genuine |
7 | 7 | * @link http://www.openwall.com/phpass/ |
8 | 8 | */ |
9 | 9 | |
… |
… |
|
29 | 29 | * Portable PHP password hashing framework. |
30 | 30 | * |
31 | 31 | * @package phpass |
32 | | * @version 0.1 / genuine |
| 32 | * @version 0.2 / genuine |
33 | 33 | * @link http://www.openwall.com/phpass/ |
34 | 34 | * @since 2.5 |
35 | 35 | */ |
… |
… |
|
50 | 50 | $this->portable_hashes = $portable_hashes; |
51 | 51 | |
52 | 52 | $this->random_state = microtime() . (function_exists('getmypid') ? getmypid() : '') . uniqid(rand(), TRUE); |
53 | | |
54 | 53 | } |
55 | 54 | |
56 | 55 | function get_random_bytes($count) |
57 | 56 | { |
58 | 57 | $output = ''; |
59 | | if (($fh = @fopen('/dev/urandom', 'rb'))) { |
| 58 | if (is_readable('/dev/urandom') && |
| 59 | ($fh = @fopen('/dev/urandom', 'rb'))) { |
60 | 60 | $output = fread($fh, $count); |
61 | 61 | fclose($fh); |
62 | 62 | } |