diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-08-24 15:56:04 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-08-26 14:58:22 +0200 |
commit | 8c08dd0ac26290829b10e28c333358ae10d953eb (patch) | |
tree | a80791395ea10b3bc2573d2576a12ceb396d71da /apps/encryption/lib/crypto/encryption.php | |
parent | 6c8c8a328abb0823a8b20e30c2ace06f2b568ea3 (diff) | |
download | nextcloud-server-8c08dd0ac26290829b10e28c333358ae10d953eb.tar.gz nextcloud-server-8c08dd0ac26290829b10e28c333358ae10d953eb.zip |
occ tool to encrypt all files
Diffstat (limited to 'apps/encryption/lib/crypto/encryption.php')
-rw-r--r-- | apps/encryption/lib/crypto/encryption.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/encryption/lib/crypto/encryption.php b/apps/encryption/lib/crypto/encryption.php index 1fa0581506b..1bd6af2eca7 100644 --- a/apps/encryption/lib/crypto/encryption.php +++ b/apps/encryption/lib/crypto/encryption.php @@ -35,6 +35,8 @@ use OCP\Encryption\IEncryptionModule; use OCA\Encryption\KeyManager; use OCP\IL10N; use OCP\ILogger; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; class Encryption implements IEncryptionModule { @@ -79,22 +81,28 @@ class Encryption implements IEncryptionModule { /** @var IL10N */ private $l; + /** @var EncryptAll */ + private $encryptAll; + /** * * @param Crypt $crypt * @param KeyManager $keyManager * @param Util $util + * @param EncryptAll $encryptAll * @param ILogger $logger * @param IL10N $il10n */ public function __construct(Crypt $crypt, KeyManager $keyManager, Util $util, + EncryptAll $encryptAll, ILogger $logger, IL10N $il10n) { $this->crypt = $crypt; $this->keyManager = $keyManager; $this->util = $util; + $this->encryptAll = $encryptAll; $this->logger = $logger; $this->l = $il10n; } @@ -398,6 +406,17 @@ class Encryption implements IEncryptionModule { } /** + * Initial encryption of all files + * + * @param InputInterface $input + * @param OutputInterface $output write some status information to the terminal during encryption + * @return bool + */ + public function encryptAll(InputInterface $input, OutputInterface $output) { + return $this->encryptAll->encryptAll($input, $output); + } + + /** * @param string $path * @return string */ |