aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/crypt.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/lib/crypt.php')
-rwxr-xr-xapps/files_encryption/lib/crypt.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php
index f92930c2cbd..5267ba81f57 100755
--- a/apps/files_encryption/lib/crypt.php
+++ b/apps/files_encryption/lib/crypt.php
@@ -217,7 +217,7 @@ class Crypt {
* @returns decrypted file
*/
public static function decrypt( $encryptedContent, $iv, $passphrase ) {
-
+
if ( $plainContent = openssl_decrypt( $encryptedContent, 'AES-128-CFB', $passphrase, false, $iv ) ) {
return $plainContent;
@@ -463,9 +463,13 @@ class Crypt {
*/
public static function keyDecrypt( $encryptedContent, $privatekey ) {
- openssl_private_decrypt( $encryptedContent, $plainContent, $privatekey );
+ $result = @openssl_private_decrypt( $encryptedContent, $plainContent, $privatekey );
- return $plainContent;
+ if ( $result ) {
+ return $plainContent;
+ }
+
+ return $result;
}