Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"description": "Encrypted symfony entity's by verified and standardized libraries",
"require": {
"php": "^7.2",
"php": "^7.2|^8.0",
"paragonie/halite": "^4.6",
"paragonie/sodium_compat": "^1.5",
"doctrine/orm": "^2.5",
Expand Down
4 changes: 3 additions & 1 deletion src/Command/DoctrineDecryptDatabaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
);

if (!$question->ask($input, $output, $confirmationQuestion)) {
return 1;
return AbstractCommand::FAILURE;
}

// Start decrypting database
Expand Down Expand Up @@ -146,5 +146,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$output->writeln('' . PHP_EOL . 'Decryption finished values found: <info>' . $valueCounter . '</info>, decrypted: <info>' . $this->subscriber->decryptCounter . '</info>.' . PHP_EOL . 'All values are now decrypted.');

return AbstractCommand::SUCCESS;
}
}
4 changes: 3 additions & 1 deletion src/Command/DoctrineEncryptDatabaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
);

if (!$question->ask($input, $output, $confirmationQuestion)) {
return 1;
return AbstractCommand::FAILURE;
}

// Start decrypting database
Expand Down Expand Up @@ -101,6 +101,8 @@ protected function execute(InputInterface $input, OutputInterface $output)

// Say it is finished
$output->writeln('Encryption finished. Values encrypted: <info>' . $this->subscriber->encryptCounter . ' values</info>.' . PHP_EOL . 'All values are now encrypted.');

return AbstractCommand::SUCCESS;
}


Expand Down
2 changes: 2 additions & 0 deletions src/Command/DoctrineEncryptStatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$output->writeln('');
$output->writeln(sprintf('<info>%d</info> entities found which are containing <info>%d</info> encrypted properties.', count($metaDataArray), $totalCount));

return AbstractCommand::SUCCESS;
}
}
14 changes: 7 additions & 7 deletions src/Resources/doc/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To make your life a little easier we created some commands that you can use for
You can use the comment `doctrine:encrypt:status` to get the current database and encryption information.

```
$ php app/console doctrine:encrypt:status
$ php bin/console doctrine:encrypt:status
```

This command will return the amount of entities and the amount of properties with the @Encrypted tag for each entity.
Expand All @@ -29,17 +29,17 @@ You can use the comment `doctrine:encrypt:database [encryptor]` to encrypt the c
* Default: Your encryptor set in the configuration file or the default encryption class when not set in the configuration file

```
$ php app/console doctrine:encrypt:database
$ php bin/console doctrine:encrypt:database
```

or you can provide an encryptor (optional).

```
$ php app/console doctrine:encrypt:database Defuse
$ php bin/console doctrine:encrypt:database Defuse
```

```
$ php app/console doctrine:encrypt:database Halite
$ php bin/console doctrine:encrypt:database Halite
```

This command will return the amount of values encrypted in the database.
Expand All @@ -58,17 +58,17 @@ You can use the comment `doctrine:decrypt:database [encryptor]` to decrypt the c
* Default: Your encryptor set in the configuration file or the default encryption class when not set in the configuration file

```
$ php app/console doctrine:decrypt:database
$ php bin/console doctrine:decrypt:database
```

or you can provide an encryptor (optional).

```
$ php app/console doctrine:decrypt:database Defuse
$ php bin/console doctrine:decrypt:database Defuse
```

```
$ php app/console doctrine:decrypt:database Halite
$ php bin/console doctrine:decrypt:database Halite
```

This command will return the amount of entities and the amount of values decrypted in the database.
Expand Down