diff options
Diffstat (limited to 'lib/private/Encryption/EncryptionWrapper.php')
-rw-r--r-- | lib/private/Encryption/EncryptionWrapper.php | 47 |
1 files changed, 11 insertions, 36 deletions
diff --git a/lib/private/Encryption/EncryptionWrapper.php b/lib/private/Encryption/EncryptionWrapper.php index a6bc72ef18f..b9db9616538 100644 --- a/lib/private/Encryption/EncryptionWrapper.php +++ b/lib/private/Encryption/EncryptionWrapper.php @@ -1,26 +1,9 @@ <?php + /** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Björn Schießle <bjoern@schiessle.org> - * @author Julius Härtl <jus@bitgrid.net> - * @author Robin Appelman <robin@icewind.nl> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only */ namespace OC\Encryption; @@ -28,6 +11,8 @@ use OC\Files\Filesystem; use OC\Files\Storage\Wrapper\Encryption; use OC\Files\View; use OC\Memcache\ArrayCache; +use OCP\Encryption\IFile; +use OCP\Encryption\Keys\IStorage as EncryptionKeysStorage; use OCP\Files\Mount\IMountPoint; use OCP\Files\Storage\IDisableEncryptionStorage; use OCP\Files\Storage\IStorage; @@ -41,10 +26,10 @@ use Psr\Log\LoggerInterface; * @package OC\Encryption */ class EncryptionWrapper { - /** @var ArrayCache */ + /** @var ArrayCache */ private $arrayCache; - /** @var Manager */ + /** @var Manager */ private $manager; private LoggerInterface $logger; @@ -54,7 +39,7 @@ class EncryptionWrapper { */ public function __construct(ArrayCache $arrayCache, Manager $manager, - LoggerInterface $logger + LoggerInterface $logger, ) { $this->arrayCache = $arrayCache; $this->manager = $manager; @@ -81,8 +66,8 @@ class EncryptionWrapper { $user = \OC::$server->getUserSession()->getUser(); $mountManager = Filesystem::getMountManager(); $uid = $user ? $user->getUID() : null; - $fileHelper = \OC::$server->getEncryptionFilesHelper(); - $keyStorage = \OC::$server->getEncryptionKeyStorage(); + $fileHelper = \OC::$server->get(IFile::class); + $keyStorage = \OC::$server->get(EncryptionKeysStorage::class); $util = new Util( new View(), @@ -90,15 +75,6 @@ class EncryptionWrapper { \OC::$server->getGroupManager(), \OC::$server->getConfig() ); - $update = new Update( - new View(), - $util, - Filesystem::getMountManager(), - $this->manager, - $fileHelper, - $this->logger, - $uid - ); return new Encryption( $parameters, $this->manager, @@ -107,7 +83,6 @@ class EncryptionWrapper { $fileHelper, $uid, $keyStorage, - $update, $mountManager, $this->arrayCache ); |