diff options
Diffstat (limited to 'apps/files_encryption/hooks/hooks.php')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index a37bd5728c1..de306462d79 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -59,18 +59,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;
|