apps/encryption/lib/Crypto/EncryptAll.php
/**
	 * start to encrypt all files
	 *
	 * @param InputInterface $input
	 * @param OutputInterface $output
	 */
start to encrypt all files
@param InputInterface $input
@param OutputInterface $output
start to encrypt all files @param InputInterface $input @param OutputInterface $output
public function encryptAll(InputInterface $input, OutputInterface $output) {
		$this->input = $input;
		$this->output = $output;
		$headline = 'Encrypt all files with the ' . Encryption::DISPLAY_NAME;
		$this->output->writeln("\n");
		$this->output->writeln($headline);
		$this->output->writeln(str_pad('', strlen($headline), '='));
		$this->output->writeln("\n");
		if ($this->util->isMasterKeyEnabled()) {
			$this->output->writeln('Use master key to encrypt all files.');
			$this->keyManager->validateMasterKey();
		} else {
			$this->output->writeln('Create key-pair for every user');
			$this->output->writeln('------------------------------');
			$this->output->writeln('');
			$this->output->writeln('This module will encrypt all files in the users files folder initially.');
			$this->output->writeln('Already existing versions and files in the trash bin will not be encrypted.');
			$this->output->writeln('');
			$this->createKeyPairs();
		}
		$this->output->writeln("\n");
		$this->output->writeln('Start to encrypt users files');
		$this->output->writeln('----------------------------');
		$this->output->writeln('');
		$this->encryptAllUsersFiles();
		if ($this->util->isMasterKeyEnabled() === false) {
			$this->output->writeln("\n");
			$this->output->writeln('Generated encryption key passwords');
			$this->output->writeln('----------------------------------');
			$this->output->writeln('');
			$this->outputPasswords();
		}
		$this->output->writeln("\n");
	}
public function encryptAll ( InputInterface $ input , OutputInterface $ output ) { $ this -> input = $ input ; $ this -> output = $ output ; $ headline = 'Encrypt all files with the ' . Encryption :: DISPLAY_NAME ; $ this -> output -> writeln ( " \n " ) ; $ this -> output -> writeln ( $ headline ) ; $ this -> output -> writeln ( str_pad ( '' , strlen ( $ headline ) , '=' ) ) ; $ this -> output -> writeln ( " \n " ) ; if ( $ this -> util -> isMasterKeyEnabled ( ) ) { $ this -> output -> writeln ( 'Use master key to encrypt all files.' ) ; $ this -> keyManager -> validateMasterKey ( ) ; } else { $ this -> output -> writeln ( 'Create key-pair for every user' ) ; $ this -> output -> writeln ( '------------------------------' ) ; $ this -> output -> writeln ( '' ) ; $ this -> output -> writeln ( 'This module will encrypt all files in the users files folder initially.' ) ; $ this -> output -> writeln ( 'Already existing versions and files in the trash bin will not be encrypted.' ) ; $ this -> output -> writeln ( '' ) ; $ this -> createKeyPairs ( ) ; } $ this -> output -> writeln ( " \n " ) ; $ this -> output -> writeln ( 'Start to encrypt users files' ) ; $ this -> output -> writeln ( '----------------------------' ) ; $ this -> output -> writeln ( '' ) ; $ this -> encryptAllUsersFiles ( ) ; if ( $ this -> util -> isMasterKeyEnabled ( ) === false ) { $ this -> output -> writeln ( " \n " ) ; $ this -> output -> writeln ( 'Generated encryption key passwords' ) ; $ this -> output -> writeln ( '----------------------------------' ) ; $ this -> output -> writeln ( '' ) ; $ this -> outputPasswords ( ) ; } $ this -> output -> writeln ( " \n " ) ; }
start to encrypt all files
 @param InputInterface $input
 @param OutputInterface $output
start to encrypt all files @param InputInterface $input @param OutputInterface $output
//create private/public keys for each user and store the private key password //setup users file system and encrypt all files one by one (take should encrypt setting of storage into account) //send-out or display password list and write it to a file