thomascube
2010-09-21 cb2bc809ef29f349d38c89e202d821e67bb4c947
program/lib/Auth/SASL/DigestMD5.php
@@ -178,15 +178,14 @@
    */
    function _getCnonce()
    {
        if (file_exists('/dev/urandom') && $fd = @fopen('/dev/urandom', 'r')) {
        if (@file_exists('/dev/urandom') && $fd = @fopen('/dev/urandom', 'r')) {
            return base64_encode(fread($fd, 32));
        } elseif (file_exists('/dev/random') && $fd = @fopen('/dev/random', 'r')) {
        } elseif (@file_exists('/dev/random') && $fd = @fopen('/dev/random', 'r')) {
            return base64_encode(fread($fd, 32));
        } else {
            $str = '';
            mt_srand((double)microtime()*10000000);
            for ($i=0; $i<32; $i++) {
                $str .= chr(mt_rand(0, 255));
            }