summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-03-19 11:42:22 +0100
committerVincent Petry <pvince81@owncloud.com>2014-03-19 11:42:22 +0100
commit80180bea325c994be3f24d14ec7dd0682429396d (patch)
treef87e4016dc43b73161b97bd0aab67783874a0cdb /lib
parent40a70ecf7906ce9ee631d237b4af6c21f5930a0f (diff)
downloadnextcloud-server-80180bea325c994be3f24d14ec7dd0682429396d.tar.gz
nextcloud-server-80180bea325c994be3f24d14ec7dd0682429396d.zip
Added IV for ext storage password encryption
Diffstat (limited to 'lib')
-rw-r--r--lib/public/util.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/public/util.php b/lib/public/util.php
index 585c5d22634..f4d749c104b 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -495,4 +495,13 @@ class Util {
public static function isValidFileName($file) {
return \OC_Util::isValidFileName($file);
}
+
+ /**
+ * @brief Generates a cryptographic secure pseudo-random string
+ * @param Int $length of the random string
+ * @return String
+ */
+ public static function generateRandomBytes($length = 30) {
+ return \OC_Util::generateRandomBytes($length);
+ }
}