Skip to content

Commit

Permalink
no no-options
Browse files Browse the repository at this point in the history
  • Loading branch information
wincelau committed Jul 30, 2024
1 parent 693ef9a commit ee3b5a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cryptography.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function encrypt() {
putenv('HOME='.sys_get_temp_dir());
foreach ($this->getFiles(false) as $file) {
$outputFile = $file.".gpg";
$command = "gpg --no-options --batch --passphrase $this->symmetricKey --symmetric --cipher-algo AES256 -o $outputFile $file";
$command = "gpg --batch --passphrase $this->symmetricKey --symmetric --cipher-algo AES256 -o $outputFile $file";
$result = shell_exec($command);
if ($result) {
echo "Cipher failure";
Expand All @@ -52,7 +52,7 @@ public function decrypt() {
mkdir($decryptFolder);
foreach ($this->getFiles(true) as $file) {
$outputFile = $decryptFolder."/".str_replace(".gpg", "", basename($file));
$command = "gpg --no-options --batch --passphrase $this->symmetricKey --decrypt -o $outputFile $file";
$command = "gpg --batch --passphrase $this->symmetricKey --decrypt -o $outputFile $file";
$result = shell_exec($command);
if ($result) {
throw new Exception("Decipher failure");
Expand Down

0 comments on commit ee3b5a9

Please sign in to comment.