summaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-04-22 11:18:18 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-22 11:53:05 +0200
commitfc4127dd62bdd1d9bd9339797607615a250ba33f (patch)
treee2ad8461ac3d85c378999aaf6a365fb5a0359a21 /lib/private/server.php
parent570718fb6bbad4dfd721b1ef451580749e9e0bdd (diff)
downloadnextcloud-server-fc4127dd62bdd1d9bd9339797607615a250ba33f.tar.gz
nextcloud-server-fc4127dd62bdd1d9bd9339797607615a250ba33f.zip
add $encryptionModuleId to methods of Keys/IStorage
Diffstat (limited to 'lib/private/server.php')
-rw-r--r--lib/private/server.php25
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/private/server.php b/lib/private/server.php
index d321ecb68bd..8fdeec5281c 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -97,8 +97,16 @@ class Server extends SimpleContainer implements IServerContainer {
return new Encryption\File($util);
});
- $this->registerService('EncryptionKeyStorageFactory', function ($c) {
- return new Encryption\Keys\Factory();
+ $this->registerService('EncryptionKeyStorage', function (Server $c) {
+ $view = new \OC\Files\View();
+ $util = new \OC\Encryption\Util(
+ $view,
+ $c->getUserManager(),
+ $c->getGroupManager(),
+ $c->getConfig()
+ );
+
+ return new Encryption\Keys\Storage($view, $util);
});
$this->registerService('TagMapper', function(Server $c) {
return new TagMapper($c->getDatabaseConnection());
@@ -436,19 +444,10 @@ class Server extends SimpleContainer implements IServerContainer {
}
/**
- * @param string $encryptionModuleId encryption module ID
- *
* @return \OCP\Encryption\Keys\IStorage
*/
- public function getEncryptionKeyStorage($encryptionModuleId) {
- $view = new \OC\Files\View();
- $util = new \OC\Encryption\Util(
- $view,
- \OC::$server->getUserManager(),
- \OC::$server->getGroupManager(),
- \OC::$server->getConfig()
- );
- return $this->query('EncryptionKeyStorageFactory')->get($encryptionModuleId, $view, $util);
+ public function getEncryptionKeyStorage() {
+ return $this->query('EncryptionKeyStorage');
}
/**