aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/crypt.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-11-04 19:58:48 +0100
committerArthur Schiwon <blizzz@owncloud.com>2012-11-04 19:58:48 +0100
commit00bb246a0d90ddbcc1016fdedb5cf629bfbca70a (patch)
treef5d69cf10ef3fd157a21990a38515c03b74035a1 /apps/files_encryption/lib/crypt.php
parentdf8c67721df1358eab7aa5794ef223a5bc8f0b59 (diff)
parent8ac3849a95bd6a733cce9134bab4bf38c5c0fadd (diff)
downloadnextcloud-server-00bb246a0d90ddbcc1016fdedb5cf629bfbca70a.tar.gz
nextcloud-server-00bb246a0d90ddbcc1016fdedb5cf629bfbca70a.zip
merge from master
Diffstat (limited to 'apps/files_encryption/lib/crypt.php')
-rw-r--r--apps/files_encryption/lib/crypt.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php
index 28bf3c5c93e..5ff3f578384 100644
--- a/apps/files_encryption/lib/crypt.php
+++ b/apps/files_encryption/lib/crypt.php
@@ -43,7 +43,7 @@ class OC_Crypt {
self::init($params['uid'], $params['password']);
}
- public static function init($login,$password) {
+ public static function init($login, $password) {
$view=new OC_FilesystemView('/');
if(!$view->file_exists('/'.$login)) {
$view->mkdir('/'.$login);
@@ -80,7 +80,7 @@ class OC_Crypt {
}
}
- public static function createkey($username,$passcode) {
+ public static function createkey($username, $passcode) {
// generate a random key
$key=mt_rand(10000, 99999).mt_rand(10000, 99999).mt_rand(10000, 99999).mt_rand(10000, 99999);
@@ -195,7 +195,7 @@ class OC_Crypt {
public static function blockEncrypt($data, $key='') {
$result='';
while(strlen($data)) {
- $result.=self::encrypt(substr($data, 0, 8192),$key);
+ $result.=self::encrypt(substr($data, 0, 8192), $key);
$data=substr($data, 8192);
}
return $result;
@@ -204,10 +204,10 @@ class OC_Crypt {
/**
* decrypt data in 8192b sized blocks
*/
- public static function blockDecrypt($data, $key='',$maxLength=0) {
+ public static function blockDecrypt($data, $key='', $maxLength=0) {
$result='';
while(strlen($data)) {
- $result.=self::decrypt(substr($data, 0, 8192),$key);
+ $result.=self::decrypt(substr($data, 0, 8192), $key);
$data=substr($data, 8192);
}
if($maxLength>0) {