summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/lib/helper.php')
-rwxr-xr-xapps/files_encryption/lib/helper.php20
1 files changed, 18 insertions, 2 deletions
diff --git a/apps/files_encryption/lib/helper.php b/apps/files_encryption/lib/helper.php
index 0d30dd8e7b5..31cf48a0393 100755
--- a/apps/files_encryption/lib/helper.php
+++ b/apps/files_encryption/lib/helper.php
@@ -132,7 +132,7 @@ class Helper {
$view->file_put_contents('/public-keys/' . $recoveryKeyId . '.public.key', $keypair['publicKey']);
- // Encrypt private key empthy passphrase
+ // Encrypt private key empty passphrase
$encryptedPrivateKey = \OCA\Encryption\Crypt::symmetricEncryptFileContent($keypair['privateKey'], $recoveryPassword);
// Save private key
@@ -217,4 +217,20 @@ class Helper {
header('Location: ' . $location . '?p=' . $post);
exit();
}
-} \ No newline at end of file
+
+
+ /**
+ * check requirements for encryption app.
+ * @return bool true if requirements are met
+ */
+ public static function checkRequirements() {
+ $result = true;
+
+ //openssl extension needs to be loaded
+ $result &= extension_loaded("openssl");
+ // we need php >= 5.3.3
+ $result &= version_compare(phpversion(), '5.3.3', '>=');
+
+ return (bool) $result;
+ }
+}