includes/rijndael.php
changeset 45 9cb99e37bfc4
parent 44 90b557e7f12c
child 54 84b56303cab5
equal deleted inserted replaced
44:90b557e7f12c 45:9cb99e37bfc4
   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