From 5b3259eb29191f52a2cd24264e6febe4a39f28d2 Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Tue, 30 Jul 2024 19:21:51 +0200 Subject: [PATCH] Pas de sortie standard --- lib/cryptography.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cryptography.class.php b/lib/cryptography.class.php index 159b2e5..5dbb2e2 100644 --- a/lib/cryptography.class.php +++ b/lib/cryptography.class.php @@ -28,7 +28,7 @@ public function encrypt() { putenv('HOME='.sys_get_temp_dir()); foreach ($this->getFiles(false) as $file) { $outputFile = $file.".gpg"; - $command = "gpg --batch --passphrase $this->symmetricKey --symmetric --cipher-algo AES256 -o $outputFile $file"; + $command = "gpg --batch --passphrase $this->symmetricKey --symmetric --cipher-algo AES256 -o $outputFile $file > /dev/null"; $result = shell_exec($command); if ($result) { echo "Cipher failure"; @@ -52,7 +52,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 --batch --passphrase $this->symmetricKey --decrypt -o $outputFile $file > /dev/null"; $result = shell_exec($command); if ($result) { throw new Exception("Decipher failure");