diff --git a/apps/encryption/settings/settings-personal.php b/apps/encryption/settings/settings-personal.php
index d1da649e374756e8b0b37730f93db174079ed430..3266351a07d090cabd0bb74b9ae7cbb764d03a32 100644
--- a/apps/encryption/settings/settings-personal.php
+++ b/apps/encryption/settings/settings-personal.php
@@ -35,7 +35,6 @@ $util = new \OCA\Encryption\Util(
 	\OC::$server->getUserSession(),
 	\OC::$server->getConfig());
 
-$session = new \OCA\Files_Encryption\Session($view);
 $session = \OC::$server->getSession();
 
 $privateKeySet = $session->get('privateKey') !== false;
diff --git a/apps/encryption/templates/settings-admin.php b/apps/encryption/templates/settings-admin.php
index 616c593f6fbfa62068d6536cbc74635e5e1314d0..b64e75512e751ccd7d9705fe1373565e4a4d8f12 100644
--- a/apps/encryption/templates/settings-admin.php
+++ b/apps/encryption/templates/settings-admin.php
@@ -7,7 +7,7 @@ script('core', 'multiselect');
 <form id="encryption" class="section">
 	<h2><?php p($l->t('ownCloud basic encryption module')); ?></h2>
 
-	<?php if($_["initStatus"] === \OCA\Files_Encryption\Session::NOT_INITIALIZED): ?>
+	<?php if(!$_["initStatus"]): ?>
 		<?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?>
 	<?php else: ?>
 	<p id="encryptionSetRecoveryKey">
diff --git a/apps/encryption/templates/settings-personal.php b/apps/encryption/templates/settings-personal.php
index a28df9ac0ecece0306ba4efb954e488a4d4e38dc..b7aa0239eeaed11dd1f267630d89ef214fd15505 100644
--- a/apps/encryption/templates/settings-personal.php
+++ b/apps/encryption/templates/settings-personal.php
@@ -5,7 +5,7 @@
 <form id="encryption" class="section">
 	<h2><?php p($l->t('ownCloud basic encryption module')); ?></h2>
 
-	<?php if ( $_["initialized"] === \OCA\Files_Encryption\Session::NOT_INITIALIZED ): ?>
+	<?php if ($_["initialized"] === \OCA\Files_Encryption\Session::NOT_INITIALIZED ): ?>
 
 	<?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?>
 
diff --git a/apps/files/index.php b/apps/files/index.php
index cfc5b931e13a07124f71ff9c265210a5cc2d3f79..3f93285902935ec0dd5a50cf5ab8adc43b4c0c76 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -86,10 +86,6 @@ $dirInfo = \OC\Files\Filesystem::getFileInfo('/', false);
 $storageInfo=OC_Helper::getStorageInfo('/', $dirInfo);
 // if the encryption app is disabled, than everything is fine (INIT_SUCCESSFUL status code)
 $encryptionInitStatus = 2;
-if (OC_App::isEnabled('files_encryption')) {
-	$session = new \OCA\Files_Encryption\Session(new \OC\Files\View('/'));
-	$encryptionInitStatus = $session->getInitialized();
-}
 
 $nav = new OCP\Template('files', 'appnavigation', '');
 
diff --git a/apps/files_sharing/tests/testcase.php b/apps/files_sharing/tests/testcase.php
index 6a831bf5f622b470c385dc9f4c6ceb71df118f24..bef727edac780ce667878db8874081b28257f682 100644
--- a/apps/files_sharing/tests/testcase.php
+++ b/apps/files_sharing/tests/testcase.php
@@ -45,7 +45,6 @@ abstract class TestCase extends \Test\TestCase {
 
 	const TEST_FILES_SHARING_API_GROUP1 = "test-share-group1";
 
-	public static $stateFilesEncryption;
 	public $filename;
 	public $data;
 	/**
@@ -58,12 +57,6 @@ abstract class TestCase extends \Test\TestCase {
 	public static function setUpBeforeClass() {
 		parent::setUpBeforeClass();
 
-		// remember files_encryption state
-		self::$stateFilesEncryption = \OC_App::isEnabled('files_encryption');
-
-		//we don't want to tests with app files_encryption enabled
-		\OC_App::disable('files_encryption');
-
 		// reset backend
 		\OC_User::clearBackends();
 		\OC_Group::clearBackends();
@@ -100,8 +93,6 @@ abstract class TestCase extends \Test\TestCase {
 
 		$this->data = 'foobar';
 		$this->view = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER1 . '/files');
-
-		$this->assertFalse(\OC_App::isEnabled('files_encryption'));
 	}
 
 	protected function tearDown() {
@@ -120,13 +111,6 @@ abstract class TestCase extends \Test\TestCase {
 		// delete group
 		\OC_Group::deleteGroup(self::TEST_FILES_SHARING_API_GROUP1);
 
-		// reset app files_encryption
-		if (self::$stateFilesEncryption) {
-			\OC_App::enable('files_encryption');
-		} else {
-			\OC_App::disable('files_encryption');
-		}
-
 		\OC_Util::tearDownFS();
 		\OC_User::setUserId('');
 		Filesystem::tearDown();
diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php
index b3176ebbe92b53274a6574e7e449a917f8f012a2..c98de79cbd0289e0bae76509530d64a2dfadded7 100644
--- a/apps/files_trashbin/tests/trashbin.php
+++ b/apps/files_trashbin/tests/trashbin.php
@@ -36,7 +36,6 @@ class Test_Trashbin extends \Test\TestCase {
 	private $trashRoot1;
 	private $trashRoot2;
 
-	private static $encryptionStatus;
 	private static $rememberRetentionObligation;
 	private static $rememberAutoExpire;
 
@@ -58,7 +57,6 @@ class Test_Trashbin extends \Test\TestCase {
 		\OCP\Util::connectHook('OC_Filesystem', 'setup', '\OC\Files\Storage\Shared', 'setup');
 
 		//disable encryption
-		self::$encryptionStatus = \OC_App::isEnabled('files_encryption');
 		\OC_App::disable('files_encryption');
 
 		//configure trashbin
@@ -82,10 +80,6 @@ class Test_Trashbin extends \Test\TestCase {
 		// cleanup test user
 		\OC_User::deleteUser(self::TEST_TRASHBIN_USER1);
 
-		if (self::$encryptionStatus === true) {
-			\OC_App::enable('files_encryption');
-		}
-
 		\OC_Config::setValue('trashbin_retention_obligation', self::$rememberRetentionObligation);
 		\OC_Config::setValue('trashbin_auto_expire', self::$rememberAutoExpire);
 
diff --git a/core/application.php b/core/application.php
index 5d12ea0280e013d5f2634863d3610b12e76711ee..cca2c60011826bb403932d1b9ec4452d9445616f 100644
--- a/core/application.php
+++ b/core/application.php
@@ -88,8 +88,8 @@ class Application extends App {
 		/**
 		 * Core class wrappers
 		 */
-		$container->registerService('IsEncryptionEnabled', function() {
-			return \OC_App::isEnabled('files_encryption');
+		$container->registerService('IsEncryptionEnabled', function(SimpleContainer $c) {
+			return $c->query('ServerContainer')->getEncryptionManager()->isEnabled();
 		});
 		$container->registerService('URLGenerator', function(SimpleContainer $c) {
 			return $c->query('ServerContainer')->getURLGenerator();
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 4fbcb732688be73014c805a4ecd88077507158e5..5b8cb17a81c96df89c4d7d635b42616320bd1ff6 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -190,7 +190,7 @@ class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
 		} else {
 			try {
 				return $this->fileView->fopen(ltrim($this->path, '/'), 'rb');
-			} catch (\OCA\Files_Encryption\Exception\EncryptionException $e) {
+			} catch (\OCP\Encryption\Exception\EncryptionException $e) {
 				throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
 			} catch (\OCP\Files\StorageNotAvailableException $e) {
 				throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to open file: ".$e->getMessage());
diff --git a/lib/private/files.php b/lib/private/files.php
index d0c1baa0c1ed4176b394a247b9c13845fd7f1aa9..97f9d8163b156ed5c78779510a86d1d9f68caba2 100644
--- a/lib/private/files.php
+++ b/lib/private/files.php
@@ -122,7 +122,7 @@ class OC_Files {
 
 		if ($get_type === self::FILE) {
 			$zip = false;
-			if ($xsendfile && OC_App::isEnabled('files_encryption')) {
+			if ($xsendfile && \OC::$server->getEncryptionManager()->isEnabled()) {
 				$xsendfile = false;
 			}
 		} else {
diff --git a/tests/lib/cache/file.php b/tests/lib/cache/file.php
index d51322036c8789566790c94d0e5dc9e983b67a59..1bf7491081d138f600f7ca8f74e790bd9740ee0f 100644
--- a/tests/lib/cache/file.php
+++ b/tests/lib/cache/file.php
@@ -41,12 +41,6 @@ class FileCache extends \Test_Cache {
 		\OC_FileProxy::clearProxies();
 		\OC_Hook::clear('OC_Filesystem');
 
-		//disabled atm
-		//enable only the encryption hook if needed
-		//if(OC_App::isEnabled('files_encryption')) {
-		//	OC_FileProxy::register(new OC_FileProxy_Encryption());
-		//}
-
 		//set up temporary storage
 		$this->storage = \OC\Files\Filesystem::getStorage('/');
 		\OC\Files\Filesystem::clearMounts();
diff --git a/tests/lib/cache/usercache.php b/tests/lib/cache/usercache.php
index 3822a714d5a5135082f71bc392ca5e0c463c884d..63667a3d34e2d4d2bd44bcecf406d9b2f6086fbc 100644
--- a/tests/lib/cache/usercache.php
+++ b/tests/lib/cache/usercache.php
@@ -37,12 +37,6 @@ class UserCache extends \Test_Cache {
 		\OC_FileProxy::clearProxies();
 		\OC_Hook::clear('OC_Filesystem');
 
-		//disabled atm
-		//enable only the encryption hook if needed
-		//if(OC_App::isEnabled('files_encryption')) {
-		//	OC_FileProxy::register(new OC_FileProxy_Encryption());
-		//}
-
 		//set up temporary storage
 		$this->storage = \OC\Files\Filesystem::getStorage('/');
 		\OC\Files\Filesystem::clearMounts();
diff --git a/tests/lib/files/cache/updaterlegacy.php b/tests/lib/files/cache/updaterlegacy.php
index 99cacca8e95a0c7c71ccfda27afeaee14c5a2872..6bdacbe34fe7e96977fe6fb45b6468f516abb383 100644
--- a/tests/lib/files/cache/updaterlegacy.php
+++ b/tests/lib/files/cache/updaterlegacy.php
@@ -22,8 +22,6 @@ class UpdaterLegacy extends \Test\TestCase {
 	 */
 	private $scanner;
 
-	private $stateFilesEncryption;
-
 	/**
 	 * @var \OC\Files\Cache\Cache $cache
 	 */
@@ -37,11 +35,6 @@ class UpdaterLegacy extends \Test\TestCase {
 	protected function setUp() {
 		parent::setUp();
 
-		// remember files_encryption state
-		$this->stateFilesEncryption = \OC_App::isEnabled('files_encryption');
-		// we want to tests with the encryption app disabled
-		\OC_App::disable('files_encryption');
-
 		$this->storage = new \OC\Files\Storage\Temporary(array());
 		$textData = "dummy file data\n";
 		$imgData = file_get_contents(\OC::$SERVERROOT . '/core/img/logo.png');
@@ -80,10 +73,6 @@ class UpdaterLegacy extends \Test\TestCase {
 		$this->assertTrue($result);
 		Filesystem::tearDown();
 		Filesystem::mount($this->originalStorage, array(), '/');
-		// reset app files_encryption
-		if ($this->stateFilesEncryption) {
-			\OC_App::enable('files_encryption');
-		}
 
 		parent::tearDown();
 	}