equal
deleted
inserted
replaced
875 // Let's use something a little more secure |
875 // Let's use something a little more secure |
876 $ur = @fopen('/dev/urandom', 'r'); |
876 $ur = @fopen('/dev/urandom', 'r'); |
877 if ( !$ur ) |
877 if ( !$ur ) |
878 return $key; |
878 return $key; |
879 $ukey = @fread($ur, $len); |
879 $ukey = @fread($ur, $len); |
|
880 fclose($ur); |
880 if ( strlen($ukey) != $len ) |
881 if ( strlen($ukey) != $len ) |
881 return $key; |
882 return $key; |
882 fclose($ur); |
|
883 return $ukey; |
883 return $ukey; |
884 } |
884 } |
885 return $key; |
885 return $key; |
886 } |
886 } |
887 |
887 |