Skip to content

Commit

Permalink
adding --no-options options
Browse files Browse the repository at this point in the history
  • Loading branch information
wincelau committed Jul 30, 2024
1 parent b8e10a4 commit f261344
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 @@ -27,7 +27,7 @@ private function getFiles($isGpg) {
public function encrypt() {
foreach ($this->getFiles(false) as $file) {
$outputFile = $file.".gpg";
$command = "gpg --batch --passphrase $this->symmetricKey --symmetric --cipher-algo AES256 -o $outputFile $file";
$command = "gpg --no-options --batch --passphrase $this->symmetricKey --symmetric --cipher-algo AES256 -o $outputFile $file";
$result = shell_exec($command);
if ($result) {
echo "Cipher failure";
Expand All @@ -51,7 +51,7 @@ public function decrypt() {
mkdir($decryptFolder);
foreach ($this->getFiles(true) as $file) {
$outputFile = $decryptFolder."/".str_replace(".gpg", "", basename($file));
$command = "gpg --batch --passphrase $this->symmetricKey --decrypt -o $outputFile $file";
$command = "gpg --no-options --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 f261344

Please sign in to comment.