aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption
diff options
context:
space:
mode:
authorKate <26026535+provokateurin@users.noreply.github.com>2024-09-19 15:49:04 +0200
committerGitHub <noreply@github.com>2024-09-19 15:49:04 +0200
commit74c38b87e513e8e8f96197c709d97881631b42b3 (patch)
treea6b6ea0825343570bacb1f8b9a6b0a7ee486fa91 /apps/encryption
parent8c60ffa0f21414e6e671c567d664a9b9e5253e26 (diff)
parent6285f550b6cd94e13e73a66894744e2ee7be32b5 (diff)
downloadnextcloud-server-74c38b87e513e8e8f96197c709d97881631b42b3.tar.gz
nextcloud-server-74c38b87e513e8e8f96197c709d97881631b42b3.zip
Merge pull request #48181 from nextcloud/chore/deps/nextcloud-coding-standard
Diffstat (limited to 'apps/encryption')
-rw-r--r--apps/encryption/lib/Command/DropLegacyFileKey.php4
-rw-r--r--apps/encryption/lib/Controller/SettingsController.php2
-rw-r--r--apps/encryption/lib/Controller/StatusController.php2
-rw-r--r--apps/encryption/lib/Crypto/Crypt.php6
-rw-r--r--apps/encryption/lib/Crypto/DecryptAll.php2
-rw-r--r--apps/encryption/lib/Crypto/EncryptAll.php2
-rw-r--r--apps/encryption/lib/KeyManager.php2
-rw-r--r--apps/encryption/lib/Settings/Admin.php2
-rw-r--r--apps/encryption/tests/Command/FixEncryptedVersionTest.php2
9 files changed, 12 insertions, 12 deletions
diff --git a/apps/encryption/lib/Command/DropLegacyFileKey.php b/apps/encryption/lib/Command/DropLegacyFileKey.php
index 03c24fe8a22..a9add1ad93b 100644
--- a/apps/encryption/lib/Command/DropLegacyFileKey.php
+++ b/apps/encryption/lib/Command/DropLegacyFileKey.php
@@ -114,10 +114,10 @@ class DropLegacyFileKey extends Command {
$copyResource = $this->rootView->fopen($target, 'r');
$sourceResource = $this->rootView->fopen($source, 'w');
if ($copyResource === false || $sourceResource === false) {
- throw new DecryptionFailedException('Failed to open '.$source.' or '.$target);
+ throw new DecryptionFailedException('Failed to open ' . $source . ' or ' . $target);
}
if (stream_copy_to_stream($copyResource, $sourceResource) === false) {
- $output->writeln('<error>Failed to copy '.$target.' data into '.$source.'</error>');
+ $output->writeln('<error>Failed to copy ' . $target . ' data into ' . $source . '</error>');
$output->writeln('<error>Leaving both files in there to avoid data loss</error>');
return;
}
diff --git a/apps/encryption/lib/Controller/SettingsController.php b/apps/encryption/lib/Controller/SettingsController.php
index 251f385127a..df896e52fa5 100644
--- a/apps/encryption/lib/Controller/SettingsController.php
+++ b/apps/encryption/lib/Controller/SettingsController.php
@@ -69,7 +69,7 @@ class SettingsController extends Controller {
Crypt $crypt,
Session $session,
ISession $ocSession,
- Util $util
+ Util $util,
) {
parent::__construct($AppName, $request);
$this->l = $l10n;
diff --git a/apps/encryption/lib/Controller/StatusController.php b/apps/encryption/lib/Controller/StatusController.php
index b5b54ee2f6d..5c6a950d0a3 100644
--- a/apps/encryption/lib/Controller/StatusController.php
+++ b/apps/encryption/lib/Controller/StatusController.php
@@ -37,7 +37,7 @@ class StatusController extends Controller {
IRequest $request,
IL10N $l10n,
Session $session,
- IManager $encryptionManager
+ IManager $encryptionManager,
) {
parent::__construct($AppName, $request);
$this->l = $l10n;
diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php
index 92d6ed6a443..b38734dd061 100644
--- a/apps/encryption/lib/Crypto/Crypt.php
+++ b/apps/encryption/lib/Crypto/Crypt.php
@@ -155,7 +155,7 @@ class Crypt {
$this->getCipher());
// Create a signature based on the key as well as the current version
- $sig = $this->createSignature($encryptedContent, $passPhrase.'_'.$version.'_'.$position);
+ $sig = $this->createSignature($encryptedContent, $passPhrase . '_' . $version . '_' . $position);
// combine content to encrypt the IV identifier and actual IV
$catFile = $this->concatIV($encryptedContent, $iv);
@@ -760,7 +760,7 @@ class Crypt {
$result = (strlen($output) === strlen($data));
}
} else {
- throw new DecryptionFailedException('Unsupported cipher '.$cipher_algo);
+ throw new DecryptionFailedException('Unsupported cipher ' . $cipher_algo);
}
return $result;
@@ -807,7 +807,7 @@ class Crypt {
}
}
} else {
- throw new EncryptionFailedException('Unsupported cipher '.$cipher_algo);
+ throw new EncryptionFailedException('Unsupported cipher ' . $cipher_algo);
}
return $result;
diff --git a/apps/encryption/lib/Crypto/DecryptAll.php b/apps/encryption/lib/Crypto/DecryptAll.php
index 80c187571b7..e153712fb99 100644
--- a/apps/encryption/lib/Crypto/DecryptAll.php
+++ b/apps/encryption/lib/Crypto/DecryptAll.php
@@ -45,7 +45,7 @@ class DecryptAll {
KeyManager $keyManager,
Crypt $crypt,
Session $session,
- QuestionHelper $questionHelper
+ QuestionHelper $questionHelper,
) {
$this->util = $util;
$this->keyManager = $keyManager;
diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php
index 310f37aba83..e9db5034baa 100644
--- a/apps/encryption/lib/Crypto/EncryptAll.php
+++ b/apps/encryption/lib/Crypto/EncryptAll.php
@@ -82,7 +82,7 @@ class EncryptAll {
IL10N $l,
IFactory $l10nFactory,
QuestionHelper $questionHelper,
- ISecureRandom $secureRandom
+ ISecureRandom $secureRandom,
) {
$this->userSetup = $userSetup;
$this->userManager = $userManager;
diff --git a/apps/encryption/lib/KeyManager.php b/apps/encryption/lib/KeyManager.php
index 9fd6c7655af..0c9c02760a8 100644
--- a/apps/encryption/lib/KeyManager.php
+++ b/apps/encryption/lib/KeyManager.php
@@ -211,7 +211,7 @@ class KeyManager {
*/
public function setRecoveryKey($password, $keyPair) {
// Save Public Key
- $this->keyStorage->setSystemUserKey($this->getRecoveryKeyId().
+ $this->keyStorage->setSystemUserKey($this->getRecoveryKeyId() .
'.' . $this->publicKeyId,
$keyPair['publicKey'],
Encryption::ID);
diff --git a/apps/encryption/lib/Settings/Admin.php b/apps/encryption/lib/Settings/Admin.php
index 4f695f61b1b..e8290b778ad 100644
--- a/apps/encryption/lib/Settings/Admin.php
+++ b/apps/encryption/lib/Settings/Admin.php
@@ -25,7 +25,7 @@ class Admin implements ISettings {
private IUserSession $userSession,
private IConfig $config,
private IUserManager $userManager,
- private ISession $session
+ private ISession $session,
) {
}
diff --git a/apps/encryption/tests/Command/FixEncryptedVersionTest.php b/apps/encryption/tests/Command/FixEncryptedVersionTest.php
index fd6e27e030b..e5079b9a8af 100644
--- a/apps/encryption/tests/Command/FixEncryptedVersionTest.php
+++ b/apps/encryption/tests/Command/FixEncryptedVersionTest.php
@@ -251,7 +251,7 @@ Fixed the file: \"/$this->userId/files/world.txt\" with version 4", $output);
$cacheInfo = ['encryptedVersion' => 1, 'encrypted' => 1];
$cache1->put($fileCache1->getPath(), $cacheInfo);
- $absPath = $storage1->getSourcePath('').$fileInfo1->getInternalPath();
+ $absPath = $storage1->getSourcePath('') . $fileInfo1->getInternalPath();
// create unencrypted file on disk, the version stays
file_put_contents($absPath, 'hello contents');