diff options
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 */ |