aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/encryption/lib')
-rw-r--r--apps/encryption/lib/AppInfo/Application.php2
-rw-r--r--apps/encryption/lib/Crypto/EncryptAll.php12
-rw-r--r--apps/encryption/lib/Crypto/Encryption.php8
-rw-r--r--apps/encryption/lib/Recovery.php4
4 files changed, 13 insertions, 13 deletions
diff --git a/apps/encryption/lib/AppInfo/Application.php b/apps/encryption/lib/AppInfo/Application.php
index 6d7c00687e3..745dfe59aa7 100644
--- a/apps/encryption/lib/AppInfo/Application.php
+++ b/apps/encryption/lib/AppInfo/Application.php
@@ -58,7 +58,7 @@ class Application extends \OCP\AppFramework\App {
/**
* @param array $urlParams
*/
- public function __construct($urlParams = array()) {
+ public function __construct($urlParams = []) {
parent::__construct('encryption', $urlParams);
$this->encryptionManager = \OC::$server->getEncryptionManager();
$this->config = \OC::$server->getConfig();
diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php
index 4865f06277e..1820140337c 100644
--- a/apps/encryption/lib/Crypto/EncryptAll.php
+++ b/apps/encryption/lib/Crypto/EncryptAll.php
@@ -120,7 +120,7 @@ class EncryptAll {
$this->questionHelper = $questionHelper;
$this->secureRandom = $secureRandom;
// store one time passwords for the users
- $this->userPasswords = array();
+ $this->userPasswords = [];
}
/**
@@ -265,7 +265,7 @@ class EncryptAll {
protected function encryptUsersFiles($uid, ProgressBar $progress, $userCount) {
$this->setupUserFS($uid);
- $directories = array();
+ $directories = [];
$directories[] = '/' . $uid . '/files';
while($root = array_pop($directories)) {
@@ -322,11 +322,11 @@ class EncryptAll {
*/
protected function outputPasswords() {
$table = new Table($this->output);
- $table->setHeaders(array('Username', 'Private key password'));
+ $table->setHeaders(['Username', 'Private key password']);
//create rows
- $newPasswords = array();
- $unchangedPasswords = array();
+ $newPasswords = [];
+ $unchangedPasswords = [];
foreach ($this->userPasswords as $uid => $password) {
if (empty($password)) {
$unchangedPasswords[] = $uid;
@@ -451,7 +451,7 @@ class EncryptAll {
$this->output->writeln("\n\nPassword successfully send to all users");
} else {
$table = new Table($this->output);
- $table->setHeaders(array('Username', 'Private key password'));
+ $table->setHeaders(['Username', 'Private key password']);
$this->output->writeln("\n\nCould not send password to following users:\n");
$rows = [];
foreach ($noMail as $uid) {
diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php
index 8b5ec5e1e05..edeb04ce857 100644
--- a/apps/encryption/lib/Crypto/Encryption.php
+++ b/apps/encryption/lib/Crypto/Encryption.php
@@ -236,7 +236,7 @@ class Encryption implements IEncryptionModule {
$this->cipher = $this->crypt->getLegacyCipher();
}
- return array('cipher' => $this->cipher, 'signed' => 'true');
+ return ['cipher' => $this->cipher, 'signed' => 'true'];
}
/**
@@ -266,7 +266,7 @@ class Encryption implements IEncryptionModule {
$result = $this->crypt->symmetricEncryptFileContent($this->writeCache, $this->fileKey, $this->version + 1, $position);
$this->writeCache = '';
}
- $publicKeys = array();
+ $publicKeys = [];
if ($this->useMasterPassword === true) {
$publicKeys[$this->keyManager->getMasterKeyId()] = $this->keyManager->getPublicMasterKey();
} else {
@@ -402,7 +402,7 @@ class Encryption implements IEncryptionModule {
if (!empty($fileKey)) {
- $publicKeys = array();
+ $publicKeys = [];
if ($this->useMasterPassword === true) {
$publicKeys[$this->keyManager->getMasterKeyId()] = $this->keyManager->getPublicMasterKey();
} else {
@@ -425,7 +425,7 @@ class Encryption implements IEncryptionModule {
} else {
$this->logger->debug('no file key found, we assume that the file "{file}" is not encrypted',
- array('file' => $path, 'app' => 'encryption'));
+ ['file' => $path, 'app' => 'encryption']);
return false;
}
diff --git a/apps/encryption/lib/Recovery.php b/apps/encryption/lib/Recovery.php
index d586d330237..335e6c13d73 100644
--- a/apps/encryption/lib/Recovery.php
+++ b/apps/encryption/lib/Recovery.php
@@ -213,7 +213,7 @@ class Recovery {
$fileKey = $this->keyManager->getFileKey($filePath, $this->user->getUID());
if (!empty($fileKey)) {
$accessList = $this->file->getAccessList($filePath);
- $publicKeys = array();
+ $publicKeys = [];
foreach ($accessList['users'] as $uid) {
$publicKeys[$uid] = $this->keyManager->getPublicKey($uid);
}
@@ -299,7 +299,7 @@ class Recovery {
if (!empty($fileKey)) {
$accessList = $this->file->getAccessList($path);
- $publicKeys = array();
+ $publicKeys = [];
foreach ($accessList['users'] as $user) {
$publicKeys[$user] = $this->keyManager->getPublicKey($user);
}