summaryrefslogtreecommitdiffstats
path: root/lib/util.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2012-10-15 19:21:37 +0200
committerLukas Reschke <lukas@statuscode.ch>2012-10-15 19:22:49 +0200
commit9faae4b71c18c925d22141556607b0f877b9bd58 (patch)
treee0ed1307001a93fa923f4182a136b83fc9dd10d6 /lib/util.php
parente49d5a5f9ac0833d78f698c422c42a55c912fb41 (diff)
downloadnextcloud-server-9faae4b71c18c925d22141556607b0f877b9bd58.tar.gz
nextcloud-server-9faae4b71c18c925d22141556607b0f877b9bd58.zip
Use /dev/urandom instead of /dev/random
The usage of /dev/urandom is enough secure
Diffstat (limited to 'lib/util.php')
-rwxr-xr-xlib/util.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/util.php b/lib/util.php
index eeed82fd364..1471b0cf1dc 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -571,8 +571,8 @@ class OC_Util {
}
}
- // Try to use /dev/random
- $fp = @file_get_contents('/dev/random', false, null, 0, $length);
+ // Try to use /dev/urandom
+ $fp = @file_get_contents('/dev/urandom', false, null, 0, $length);
if ($fp !== FALSE) {
$string = substr(bin2hex($fp), 0, $length);
return $string;
@@ -605,8 +605,8 @@ class OC_Util {
}
}
- // Check /dev/random
- $fp = @file_get_contents('/dev/random', false, null, 0, 1);
+ // Check /dev/urandom
+ $fp = @file_get_contents('/dev/urandom', false, null, 0, 1);
if ($fp !== FALSE) {
return true;
}