summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/ajax/changeRecoveryPassword.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-12-03 16:52:44 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-12-09 09:47:26 +0100
commitefac8ced90879f34919eb55055423523b146d33e (patch)
treeee2778caa0a8ddf5c181a590625d98081e0c7d63 /apps/files_encryption/ajax/changeRecoveryPassword.php
parent78a307995c510c0184d915fcab26baa3be815342 (diff)
downloadnextcloud-server-efac8ced90879f34919eb55055423523b146d33e.tar.gz
nextcloud-server-efac8ced90879f34919eb55055423523b146d33e.zip
Update OCA\Encryption to OCA\Files_Encryption in the encryption app itself
Diffstat (limited to 'apps/files_encryption/ajax/changeRecoveryPassword.php')
-rw-r--r--apps/files_encryption/ajax/changeRecoveryPassword.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/files_encryption/ajax/changeRecoveryPassword.php b/apps/files_encryption/ajax/changeRecoveryPassword.php
index 01b76a969b6..3d31b12af7c 100644
--- a/apps/files_encryption/ajax/changeRecoveryPassword.php
+++ b/apps/files_encryption/ajax/changeRecoveryPassword.php
@@ -9,8 +9,6 @@
*
*/
-use OCA\Encryption;
-
\OCP\JSON::checkAdminUser();
\OCP\JSON::checkAppEnabled('files_encryption');
\OCP\JSON::callCheck();
@@ -49,21 +47,21 @@ if ($_POST['newPassword'] !== $_POST['confirmPassword']) {
}
$view = new \OC\Files\View('/');
-$util = new \OCA\Encryption\Util(new \OC\Files\View('/'), \OCP\User::getUser());
+$util = new \OCA\Files_Encryption\Util(new \OC\Files\View('/'), \OCP\User::getUser());
$proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false;
$keyId = $util->getRecoveryKeyId();
-$encryptedRecoveryKey = Encryption\Keymanager::getPrivateSystemKey($keyId);
-$decryptedRecoveryKey = $encryptedRecoveryKey ? \OCA\Encryption\Crypt::decryptPrivateKey($encryptedRecoveryKey, $oldPassword) : false;
+$encryptedRecoveryKey = \OCA\Files_Encryption\Keymanager::getPrivateSystemKey($keyId);
+$decryptedRecoveryKey = $encryptedRecoveryKey ? \OCA\Files_Encryption\Crypt::decryptPrivateKey($encryptedRecoveryKey, $oldPassword) : false;
if ($decryptedRecoveryKey) {
- $cipher = \OCA\Encryption\Helper::getCipher();
- $encryptedKey = \OCA\Encryption\Crypt::symmetricEncryptFileContent($decryptedRecoveryKey, $newPassword, $cipher);
+ $cipher = \OCA\Files_Encryption\Helper::getCipher();
+ $encryptedKey = \OCA\Files_Encryption\Crypt::symmetricEncryptFileContent($decryptedRecoveryKey, $newPassword, $cipher);
if ($encryptedKey) {
- \OCA\Encryption\Keymanager::setPrivateSystemKey($encryptedKey, $keyId);
+ \OCA\Files_Encryption\Keymanager::setPrivateSystemKey($encryptedKey, $keyId);
$return = true;
}
}