From b6fa0e4eefb332dc1fb9b45df50de4621ed8e6bd Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 29 Jul 2013 17:06:05 +0200 Subject: working decrypt files method --- apps/files_encryption/hooks/hooks.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'apps/files_encryption/hooks') diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index b2a17f6bca5..d9c3f49b736 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -62,18 +62,7 @@ class Hooks { return false; } - $encryptedKey = Keymanager::getPrivateKey($view, $params['uid']); - - $privateKey = Crypt::decryptPrivateKey($encryptedKey, $params['password']); - - if ($privateKey === false) { - \OCP\Util::writeLog('Encryption library', 'Private key for user "' . $params['uid'] - . '" is not valid! Maybe the user password was changed from outside if so please change it back to gain access', \OCP\Util::ERROR); - } - - $session = new \OCA\Encryption\Session($view); - - $session->setPrivateKey($privateKey); + $session = $util->initEncryption($params); // Check if first-run file migration has already been performed $ready = false; -- cgit v1.2.3