summaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/server.php')
-rw-r--r--lib/private/server.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/server.php b/lib/private/server.php
index a38096cf740..661aaf6786d 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -87,6 +87,11 @@ class Server extends SimpleContainer implements IServerContainer {
return new Encryption\Manager($c->getConfig());
});
+ $this->registerService('EncryptionFileHelper', function (Server $c) {
+ $util = new \OC\Encryption\Util(new \OC\Files\View(), $c->getUserManager(), $c->getConfig());
+ return new Encryption\File($util);
+ });
+
$this->registerService('EncryptionKeyStorageFactory', function ($c) {
return new Encryption\Keys\Factory();
});
@@ -408,6 +413,13 @@ class Server extends SimpleContainer implements IServerContainer {
}
/**
+ * @return \OC\Encryption\File
+ */
+ function getEncryptionFilesHelper() {
+ return $this->query('EncryptionFileHelper');
+ }
+
+ /**
* @param string $encryptionModuleId encryption module ID
*
* @return \OCP\Encryption\Keys\IStorage