summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2013-02-09 11:52:11 +0000
committerSam Tuke <samtuke@owncloud.com>2013-02-09 11:52:11 +0000
commitb95bc663af4135eff12a6a0c97afe37859f35094 (patch)
tree3ebb198e5f10ae34b9478b925e4a58d0be3c4aea /apps/files_encryption
parentd2b288ca704af4d74d1fa13e44966b1c34cf56bd (diff)
parentab4ae2b952fedf7bac2810bb6be7997fb661a1fc (diff)
downloadnextcloud-server-b95bc663af4135eff12a6a0c97afe37859f35094.tar.gz
nextcloud-server-b95bc663af4135eff12a6a0c97afe37859f35094.zip
Merge branch 'master' into files_encryption-style-fixes
Conflicts: apps/files_encryption/lib/crypt.php apps/files_encryption/lib/util.php
Diffstat (limited to 'apps/files_encryption')
-rw-r--r--apps/files_encryption/appinfo/app.php2
-rw-r--r--apps/files_encryption/hooks/hooks.php9
-rw-r--r--apps/files_encryption/l10n/ar.php1
-rw-r--r--apps/files_encryption/l10n/bg_BG.php1
-rw-r--r--apps/files_encryption/l10n/bn_BD.php1
-rw-r--r--apps/files_encryption/l10n/ca.php10
-rw-r--r--apps/files_encryption/l10n/cs_CZ.php10
-rw-r--r--apps/files_encryption/l10n/da.php7
-rw-r--r--apps/files_encryption/l10n/de.php7
-rw-r--r--apps/files_encryption/l10n/de_DE.php10
-rw-r--r--apps/files_encryption/l10n/el.php2
-rw-r--r--apps/files_encryption/l10n/eo.php1
-rw-r--r--apps/files_encryption/l10n/es.php10
-rw-r--r--apps/files_encryption/l10n/es_AR.php7
-rw-r--r--apps/files_encryption/l10n/et_EE.php1
-rw-r--r--apps/files_encryption/l10n/eu.php4
-rw-r--r--apps/files_encryption/l10n/fa.php2
-rw-r--r--apps/files_encryption/l10n/fi_FI.php4
-rw-r--r--apps/files_encryption/l10n/fr.php10
-rw-r--r--apps/files_encryption/l10n/gl.php1
-rw-r--r--apps/files_encryption/l10n/he.php1
-rw-r--r--apps/files_encryption/l10n/hu_HU.php7
-rw-r--r--apps/files_encryption/l10n/id.php1
-rw-r--r--apps/files_encryption/l10n/is.php1
-rw-r--r--apps/files_encryption/l10n/it.php10
-rw-r--r--apps/files_encryption/l10n/ja_JP.php10
-rw-r--r--apps/files_encryption/l10n/ko.php7
-rw-r--r--apps/files_encryption/l10n/ku_IQ.php1
-rw-r--r--apps/files_encryption/l10n/lt_LT.php1
-rw-r--r--apps/files_encryption/l10n/lv.php10
-rw-r--r--apps/files_encryption/l10n/mk.php1
-rw-r--r--apps/files_encryption/l10n/nb_NO.php1
-rw-r--r--apps/files_encryption/l10n/nl.php8
-rw-r--r--apps/files_encryption/l10n/pl.php1
-rw-r--r--apps/files_encryption/l10n/pt_BR.php7
-rw-r--r--apps/files_encryption/l10n/pt_PT.php7
-rw-r--r--apps/files_encryption/l10n/ro.php7
-rw-r--r--apps/files_encryption/l10n/ru.php9
-rw-r--r--apps/files_encryption/l10n/ru_RU.php7
-rw-r--r--apps/files_encryption/l10n/si_LK.php1
-rw-r--r--apps/files_encryption/l10n/sk_SK.php10
-rw-r--r--apps/files_encryption/l10n/sl.php1
-rw-r--r--apps/files_encryption/l10n/sr.php1
-rw-r--r--apps/files_encryption/l10n/sv.php10
-rw-r--r--apps/files_encryption/l10n/ta_LK.php1
-rw-r--r--apps/files_encryption/l10n/th_TH.php7
-rw-r--r--apps/files_encryption/l10n/tr.php1
-rw-r--r--apps/files_encryption/l10n/uk.php1
-rw-r--r--apps/files_encryption/l10n/vi.php1
-rw-r--r--apps/files_encryption/l10n/zh_CN.GB2312.php1
-rw-r--r--apps/files_encryption/l10n/zh_CN.php1
-rw-r--r--apps/files_encryption/l10n/zh_TW.php7
-rwxr-xr-xapps/files_encryption/lib/crypt.php1366
-rw-r--r--apps/files_encryption/lib/util.php38
54 files changed, 730 insertions, 914 deletions
diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php
index e426f237bbe..f83109a18ea 100644
--- a/apps/files_encryption/appinfo/app.php
+++ b/apps/files_encryption/appinfo/app.php
@@ -12,7 +12,7 @@ OC_FileProxy::register( new OCA\Encryption\Proxy() );
// User-related hooks
OCP\Util::connectHook( 'OC_User', 'post_login', 'OCA\Encryption\Hooks', 'login' );
-OCP\Util::connectHook( 'OC_User', 'post_setPassword','OCA\Encryption\Hooks', 'setPassphrase' );
+OCP\Util::connectHook( 'OC_User', 'pre_setPassword','OCA\Encryption\Hooks', 'setPassphrase' );
// Sharing-related hooks
OCP\Util::connectHook( 'OCP\Share', 'post_shared', 'OCA\Encryption\Hooks', 'postShared' );
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 065ef9d2410..8bdeee0937b 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -38,12 +38,15 @@ class Hooks {
*/
public static function login( $params ) {
+ // Manually initialise Filesystem{} singleton with correct
+ // fake root path, in order to avoid fatal webdav errors
\OC\Files\Filesystem::init( $params['uid'] . '/' . 'files' . '/' );
$view = new \OC_FilesystemView( '/' );
$util = new Util( $view, $params['uid'] );
+ // Check files_encryption infrastructure is ready for action
if ( ! $util->ready() ) {
\OC_Log::write( 'Encryption library', 'User account "' . $params['uid'] . '" is not ready for encryption; configuration started', \OC_Log::DEBUG );
@@ -104,14 +107,16 @@ class Hooks {
* @param array $params keys: uid, password
*/
public static function setPassphrase( $params ) {
-
+
// Only attempt to change passphrase if server-side encryption
// is in use (client-side encryption does not have access to
// the necessary keys)
if ( Crypt::mode() == 'server' ) {
+ $session = new Session();
+
// Get existing decrypted private key
- $privateKey = $_SESSION['privateKey'];
+ $privateKey = $session->getPrivateKey();
// Encrypt private key with new user pwd as passphrase
$encryptedPrivateKey = Crypt::symmetricEncryptFileContent( $privateKey, $params['password'] );
diff --git a/apps/files_encryption/l10n/ar.php b/apps/files_encryption/l10n/ar.php
index f08585e485f..375fbd9a9a6 100644
--- a/apps/files_encryption/l10n/ar.php
+++ b/apps/files_encryption/l10n/ar.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "التشفير",
-"Exclude the following file types from encryption" => "استبعد أنواع الملفات التالية من التشفير",
"None" => "لا شيء"
);
diff --git a/apps/files_encryption/l10n/bg_BG.php b/apps/files_encryption/l10n/bg_BG.php
index 4ceee127af1..07a97f5f8a6 100644
--- a/apps/files_encryption/l10n/bg_BG.php
+++ b/apps/files_encryption/l10n/bg_BG.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Криптиране",
-"Exclude the following file types from encryption" => "Изключване на следните файлови типове от криптирането",
"None" => "Няма"
);
diff --git a/apps/files_encryption/l10n/bn_BD.php b/apps/files_encryption/l10n/bn_BD.php
index 29c486b8ca0..43767d56518 100644
--- a/apps/files_encryption/l10n/bn_BD.php
+++ b/apps/files_encryption/l10n/bn_BD.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "সংকেতায়ন",
-"Exclude the following file types from encryption" => "সংকেতায়ন থেকে নিম্নোক্ত ধরণসমূহ বাদ দাও",
"None" => "কোনটিই নয়"
);
diff --git a/apps/files_encryption/l10n/ca.php b/apps/files_encryption/l10n/ca.php
index 56c81e747f7..1b888f7714b 100644
--- a/apps/files_encryption/l10n/ca.php
+++ b/apps/files_encryption/l10n/ca.php
@@ -4,13 +4,9 @@
"Change encryption password to login password" => "Canvia la contrasenya d'encriptació per la d'accés",
"Please check your passwords and try again." => "Comproveu les contrasenyes i proveu-ho de nou.",
"Could not change your file encryption password to your login password" => "No s'ha pogut canviar la contrasenya d'encriptació de fitxers per la d'accés",
-"Choose encryption mode:" => "Escolliu el mode d'encriptació:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Encriptació per part del client (més segura però fa impossible l'accés a les dades des de la interfície web)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Encriptació per part del servidor (permet accedir als fitxers des de la interfície web i des del client d'escriptori)",
-"None (no encryption at all)" => "Cap (sense encriptació)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Important: quan seleccioneu un mode d'encriptació no hi ha manera de canviar-lo de nou",
-"User specific (let the user decide)" => "Específic per usuari (permet que l'usuari ho decideixi)",
"Encryption" => "Encriptatge",
-"Exclude the following file types from encryption" => "Exclou els tipus de fitxers següents de l'encriptatge",
+"File encryption is enabled." => "L'encriptació de fitxers està activada.",
+"The following file types will not be encrypted:" => "Els tipus de fitxers següents no s'encriptaran:",
+"Exclude the following file types from encryption:" => "Exclou els tipus de fitxers següents de l'encriptatge:",
"None" => "Cap"
);
diff --git a/apps/files_encryption/l10n/cs_CZ.php b/apps/files_encryption/l10n/cs_CZ.php
index 5948a9b82e8..3278f13920a 100644
--- a/apps/files_encryption/l10n/cs_CZ.php
+++ b/apps/files_encryption/l10n/cs_CZ.php
@@ -4,13 +4,9 @@
"Change encryption password to login password" => "Změnit šifrovací heslo na přihlašovací",
"Please check your passwords and try again." => "Zkontrolujte, prosím, své heslo a zkuste to znovu.",
"Could not change your file encryption password to your login password" => "Nelze změnit šifrovací heslo na přihlašovací.",
-"Choose encryption mode:" => "Vyberte režim šifrování:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Šifrování na straně klienta (nejbezpečnější ale neumožňuje vám přistupovat k souborům z webového rozhraní)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Šifrování na straně serveru (umožňuje vám přistupovat k souborům pomocí webového rozhraní i aplikací)",
-"None (no encryption at all)" => "Žádný (vůbec žádné šifrování)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Důležité: jak si jednou vyberete režim šifrování nelze jej opětovně změnit",
-"User specific (let the user decide)" => "Definován uživatelem (umožní uživateli si vybrat)",
"Encryption" => "Šifrování",
-"Exclude the following file types from encryption" => "Při šifrování vynechat následující typy souborů",
+"File encryption is enabled." => "Šifrování je povoleno.",
+"The following file types will not be encrypted:" => "Následující typy souborů nebudou šifrovány:",
+"Exclude the following file types from encryption:" => "Vyjmout následující typy souborů ze šifrování:",
"None" => "Žádné"
);
diff --git a/apps/files_encryption/l10n/da.php b/apps/files_encryption/l10n/da.php
index d65963f46b2..c9255759cb8 100644
--- a/apps/files_encryption/l10n/da.php
+++ b/apps/files_encryption/l10n/da.php
@@ -4,13 +4,6 @@
"Change encryption password to login password" => "Udskift krypteringskode til login-adgangskode",
"Please check your passwords and try again." => "Check adgangskoder og forsøg igen.",
"Could not change your file encryption password to your login password" => "Kunne ikke udskifte krypteringskode med login-adgangskode",
-"Choose encryption mode:" => "Vælg krypteringsform:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Kryptering på klientsiden (mere sikker, men udelukker adgang til dataene fra webinterfacet)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Kryptering på serversiden (gør det muligt at tilgå filer fra webinterfacet såvel som desktopklienten)",
-"None (no encryption at all)" => "Ingen (ingen kryptering)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Vigtigt: Når der er valgt krypteringsform, kan det ikke ændres tilbage igen.",
-"User specific (let the user decide)" => "Brugerspecifik (lad brugeren bestemme)",
"Encryption" => "Kryptering",
-"Exclude the following file types from encryption" => "Ekskluder følgende filtyper fra kryptering",
"None" => "Ingen"
);
diff --git a/apps/files_encryption/l10n/de.php b/apps/files_encryption/l10n/de.php
index e187f72ab50..c3c69e09007 100644
--- a/apps/files_encryption/l10n/de.php
+++ b/apps/files_encryption/l10n/de.php
@@ -4,13 +4,6 @@
"Change encryption password to login password" => "Ändern des Verschlüsselungspasswortes zum Anmeldepasswort",
"Please check your passwords and try again." => "Bitte überprüfen sie Ihr Passwort und versuchen Sie es erneut.",
"Could not change your file encryption password to your login password" => "Ihr Verschlüsselungspasswort konnte nicht als Anmeldepasswort gesetzt werden.",
-"Choose encryption mode:" => "Wählen Sie die Verschlüsselungsart:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Clientseitige Verschlüsselung (am sichersten, aber macht es unmöglich auf ihre Daten über das Webinterface zuzugreifen)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Serverseitige Verschlüsselung (erlaubt es ihnen auf ihre Daten über das Webinterface und den Desktop-Client zuzugreifen)",
-"None (no encryption at all)" => "Keine (ohne Verschlüsselung)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Wichtig: Sobald sie eine Verschlüsselungsmethode gewählt haben, können Sie diese nicht ändern!",
-"User specific (let the user decide)" => "Benutzerspezifisch (der Benutzer kann entscheiden)",
"Encryption" => "Verschlüsselung",
-"Exclude the following file types from encryption" => "Die folgenden Dateitypen von der Verschlüsselung ausnehmen",
"None" => "Keine"
);
diff --git a/apps/files_encryption/l10n/de_DE.php b/apps/files_encryption/l10n/de_DE.php
index be4369ebf09..465af23efdd 100644
--- a/apps/files_encryption/l10n/de_DE.php
+++ b/apps/files_encryption/l10n/de_DE.php
@@ -4,13 +4,9 @@
"Change encryption password to login password" => "Ändern des Verschlüsselungspasswortes zum Anmeldepasswort",
"Please check your passwords and try again." => "Bitte überprüfen sie Ihr Passwort und versuchen Sie es erneut.",
"Could not change your file encryption password to your login password" => "Ihr Verschlüsselungspasswort konnte nicht als Anmeldepasswort gesetzt werden.",
-"Choose encryption mode:" => "Wählen Sie die Verschlüsselungsmethode:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Clientseitige Verschlüsselung (am sichersten, aber macht es unmöglich auf ihre Daten über das Webinterface zuzugreifen)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Serverseitige Verschlüsselung (erlaubt es ihnen auf ihre Daten über das Webinterface und den Desktop-Client zuzugreifen)",
-"None (no encryption at all)" => "Keine (ohne Verschlüsselung)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Wichtig: Sobald sie eine Verschlüsselungsmethode gewählt haben, können Sie diese nicht ändern!",
-"User specific (let the user decide)" => "Benutzerspezifisch (der Benutzer kann entscheiden)",
"Encryption" => "Verschlüsselung",
-"Exclude the following file types from encryption" => "Die folgenden Dateitypen von der Verschlüsselung ausnehmen",
+"File encryption is enabled." => "Datei-Verschlüsselung ist aktiviert",
+"The following file types will not be encrypted:" => "Die folgenden Datei-Typen werden nicht verschlüsselt:",
+"Exclude the following file types from encryption:" => "Die folgenden Datei-Typen von der Verschlüsselung ausnehmen:",
"None" => "Keine"
);
diff --git a/apps/files_encryption/l10n/el.php b/apps/files_encryption/l10n/el.php
index 50b812c82df..94bb68bcbca 100644
--- a/apps/files_encryption/l10n/el.php
+++ b/apps/files_encryption/l10n/el.php
@@ -2,8 +2,6 @@
"Change encryption password to login password" => "Αλλαγή συνθηματικού κρυπτογράφησης στο συνθηματικό εισόδου ",
"Please check your passwords and try again." => "Παρακαλώ ελέγξτε το συνθηματικό σας και προσπαθήστε ξανά.",
"Could not change your file encryption password to your login password" => "Αδυναμία αλλαγής συνθηματικού κρυπτογράφησης αρχείων στο συνθηματικό εισόδου σας",
-"Choose encryption mode:" => "Επιλογή κατάστασης κρυπτογράφησης:",
"Encryption" => "Κρυπτογράφηση",
-"Exclude the following file types from encryption" => "Εξαίρεση των παρακάτω τύπων αρχείων από την κρυπτογράφηση",
"None" => "Καμία"
);
diff --git a/apps/files_encryption/l10n/eo.php b/apps/files_encryption/l10n/eo.php
index c6f82dcb8a0..50847062c3b 100644
--- a/apps/files_encryption/l10n/eo.php
+++ b/apps/files_encryption/l10n/eo.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Ĉifrado",
-"Exclude the following file types from encryption" => "Malinkluzivigi la jenajn dosiertipojn el ĉifrado",
"None" => "Nenio"
);
diff --git a/apps/files_encryption/l10n/es.php b/apps/files_encryption/l10n/es.php
index 2c6b650960a..73b5f273d1f 100644
--- a/apps/files_encryption/l10n/es.php
+++ b/apps/files_encryption/l10n/es.php
@@ -4,13 +4,9 @@
"Change encryption password to login password" => "Cambie la clave de cifrado para su contraseña de inicio de sesión",
"Please check your passwords and try again." => "Por favor revise su contraseña e intentelo de nuevo.",
"Could not change your file encryption password to your login password" => "No se pudo cambiar la contraseña de cifrado de archivos de su contraseña de inicio de sesión",
-"Choose encryption mode:" => "Elegir el modo de cifrado:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Cifrado del lado del Cliente ( es el más seguro, pero hace que sea imposible acceder a sus datos desde la interfaz web)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Cifrado del lado del Servidor (le permite acceder a sus archivos desde la interfaz web y el cliente de escritorio)",
-"None (no encryption at all)" => "Ninguno (ningún cifrado en absoluto)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Importante: Una vez que haya seleccionado un modo de cifrado no existe forma de cambiarlo de nuevo",
-"User specific (let the user decide)" => "Específico del usuario (dejar que el usuario decida)",
"Encryption" => "Cifrado",
-"Exclude the following file types from encryption" => "Excluir del cifrado los siguientes tipos de archivo",
+"File encryption is enabled." => "La encriptacion de archivo esta activada.",
+"The following file types will not be encrypted:" => "Los siguientes tipos de archivo no seran encriptados:",
+"Exclude the following file types from encryption:" => "Excluir los siguientes tipos de archivo de la encriptacion:",
"None" => "Ninguno"
);
diff --git a/apps/files_encryption/l10n/es_AR.php b/apps/files_encryption/l10n/es_AR.php
index 5cf0b8e4adc..8160db10df6 100644
--- a/apps/files_encryption/l10n/es_AR.php
+++ b/apps/files_encryption/l10n/es_AR.php
@@ -4,13 +4,6 @@
"Change encryption password to login password" => "Cambiá la clave de encriptado para tu contraseña de inicio de sesión",
"Please check your passwords and try again." => "Por favor, revisá tu contraseña e intentalo de nuevo.",
"Could not change your file encryption password to your login password" => "No se pudo cambiar la contraseña de encriptación de archivos de tu contraseña de inicio de sesión",
-"Choose encryption mode:" => "Elegir el modo de encriptación:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Encriptación por parte del cliente (es el modo más seguro, pero hace que sea imposible acceder a tus datos desde la interfaz web)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Encriptación por parte del servidor (te permite acceder a tus archivos desde la interfaz web y desde el cliente de escritorio)",
-"None (no encryption at all)" => "Ninguno (ninguna encriptación en absoluto)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Importante: Una vez que haya seleccionado un modo de encriptación, no existe forma de cambiarlo nuevamente",
-"User specific (let the user decide)" => "Específico por usuario (deja que el usuario decida)",
"Encryption" => "Encriptación",
-"Exclude the following file types from encryption" => "Exceptuar de la encriptación los siguientes tipos de archivo",
"None" => "Ninguno"
);
diff --git a/apps/files_encryption/l10n/et_EE.php b/apps/files_encryption/l10n/et_EE.php
index 0c0ef231145..07f1a48fb0b 100644
--- a/apps/files_encryption/l10n/et_EE.php
+++ b/apps/files_encryption/l10n/et_EE.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Krüpteerimine",
-"Exclude the following file types from encryption" => "Järgnevaid failitüüpe ära krüpteeri",
"None" => "Pole"
);
diff --git a/apps/files_encryption/l10n/eu.php b/apps/files_encryption/l10n/eu.php
index e7372937e4a..a2368816f52 100644
--- a/apps/files_encryption/l10n/eu.php
+++ b/apps/files_encryption/l10n/eu.php
@@ -1,9 +1,5 @@
<?php $TRANSLATIONS = array(
"Please check your passwords and try again." => "Mesedez egiaztatu zure pasahitza eta saia zaitez berriro:",
-"Choose encryption mode:" => "Hautatu enkriptazio modua:",
-"None (no encryption at all)" => "Bat ere ez (enkriptaziorik gabe)",
-"User specific (let the user decide)" => "Erabiltzaileak zehaztuta (utzi erabiltzaileari hautatzen)",
"Encryption" => "Enkriptazioa",
-"Exclude the following file types from encryption" => "Ez enkriptatu hurrengo fitxategi motak",
"None" => "Bat ere ez"
);
diff --git a/apps/files_encryption/l10n/fa.php b/apps/files_encryption/l10n/fa.php
index 0cdee74f5a9..2186c9025b4 100644
--- a/apps/files_encryption/l10n/fa.php
+++ b/apps/files_encryption/l10n/fa.php
@@ -1,5 +1,5 @@
<?php $TRANSLATIONS = array(
+"Please check your passwords and try again." => "لطفا گذرواژه خود را بررسی کنید و دوباره امتحان کنید.",
"Encryption" => "رمزگذاری",
-"Exclude the following file types from encryption" => "نادیده گرفتن فایل های زیر برای رمز گذاری",
"None" => "هیچ‌کدام"
);
diff --git a/apps/files_encryption/l10n/fi_FI.php b/apps/files_encryption/l10n/fi_FI.php
index 33756c2831f..8a9dd30e670 100644
--- a/apps/files_encryption/l10n/fi_FI.php
+++ b/apps/files_encryption/l10n/fi_FI.php
@@ -1,9 +1,5 @@
<?php $TRANSLATIONS = array(
"Please check your passwords and try again." => "Tarkista salasanasi ja yritä uudelleen.",
-"Choose encryption mode:" => "Choose encryption mode:",
-"None (no encryption at all)" => "Ei mitään (ei lainkaan salausta)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Tärkeä huomautus: Kun olet valinnut salaustatavan, sitä ei ole mahdollista vaihtaa",
"Encryption" => "Salaus",
-"Exclude the following file types from encryption" => "Jätä seuraavat tiedostotyypit salaamatta",
"None" => "Ei mitään"
);
diff --git a/apps/files_encryption/l10n/fr.php b/apps/files_encryption/l10n/fr.php
index 41e37134d4e..7d431e6e462 100644
--- a/apps/files_encryption/l10n/fr.php
+++ b/apps/files_encryption/l10n/fr.php
@@ -4,13 +4,9 @@
"Change encryption password to login password" => "Convertir le mot de passe de chiffrement en mot de passe de connexion",
"Please check your passwords and try again." => "Veuillez vérifier vos mots de passe et réessayer.",
"Could not change your file encryption password to your login password" => "Impossible de convertir votre mot de passe de chiffrement en mot de passe de connexion",
-"Choose encryption mode:" => "Choix du type de chiffrement :",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Chiffrement côté client (plus sécurisé, mais ne permet pas l'accès à vos données depuis l'interface web)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Chiffrement côté serveur (vous permet d'accéder à vos fichiers depuis l'interface web et depuis le client de synchronisation)",
-"None (no encryption at all)" => "Aucun (pas de chiffrement)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Important : Une fois le mode de chiffrement choisi, il est impossible de revenir en arrière",
-"User specific (let the user decide)" => "Propre à l'utilisateur (laisse le choix à l'utilisateur)",
"Encryption" => "Chiffrement",
-"Exclude the following file types from encryption" => "Ne pas chiffrer les fichiers dont les types sont les suivants",
+"File encryption is enabled." => "Le chiffrement des fichiers est activé",
+"The following file types will not be encrypted:" => "Les fichiers de types suivants ne seront pas chiffrés :",
+"Exclude the following file types from encryption:" => "Ne pas chiffrer les fichiers dont les types sont les suivants :",
"None" => "Aucun"
);
diff --git a/apps/files_encryption/l10n/gl.php b/apps/files_encryption/l10n/gl.php
index 42fcfce1cc0..b240990f3d5 100644
--- a/apps/files_encryption/l10n/gl.php
+++ b/apps/files_encryption/l10n/gl.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Cifrado",
-"Exclude the following file types from encryption" => "Excluír os seguintes tipos de ficheiro do cifrado",
"None" => "Nada"
);
diff --git a/apps/files_encryption/l10n/he.php b/apps/files_encryption/l10n/he.php
index 9adb6d2b92a..cbb74bfee9a 100644
--- a/apps/files_encryption/l10n/he.php
+++ b/apps/files_encryption/l10n/he.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "הצפנה",
-"Exclude the following file types from encryption" => "הוצא את סוגי הקבצים הבאים מהצפנה",
"None" => "כלום"
);
diff --git a/apps/files_encryption/l10n/hu_HU.php b/apps/files_encryption/l10n/hu_HU.php
index e32de01f973..fa62ae75fb6 100644
--- a/apps/files_encryption/l10n/hu_HU.php
+++ b/apps/files_encryption/l10n/hu_HU.php
@@ -4,13 +4,6 @@
"Change encryption password to login password" => "Titkosítási jelszó módosítása a bejelentkezési jelszóra",
"Please check your passwords and try again." => "Kérjük, ellenőrizze a jelszavait, és próbálja meg újra.",
"Could not change your file encryption password to your login password" => "Nem módosíthatja a fájltitkosítási jelszavát a bejelentkezési jelszavára",
-"Choose encryption mode:" => "Válassza ki a titkosítási módot:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Kliens oldali titkosítás (biztonságosabb, de lehetetlenné teszi a fájlok elérését a böngészőből)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Kiszolgáló oldali titkosítás (lehetővé teszi a fájlok elérését úgy böngészőből mint az asztali kliensből)",
-"None (no encryption at all)" => "Semmi (semmilyen titkosítás)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Fontos: Ha egyszer kiválasztotta a titkosítás módját, többé már nem lehet megváltoztatni",
-"User specific (let the user decide)" => "Felhasználó specifikus (a felhasználó választhat)",
"Encryption" => "Titkosítás",
-"Exclude the following file types from encryption" => "A következő fájltípusok kizárása a titkosításból",
"None" => "Egyik sem"
);
diff --git a/apps/files_encryption/l10n/id.php b/apps/files_encryption/l10n/id.php
index 20f33b87829..3f9a6c7d07f 100644
--- a/apps/files_encryption/l10n/id.php
+++ b/apps/files_encryption/l10n/id.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "enkripsi",
-"Exclude the following file types from encryption" => "pengecualian untuk tipe file berikut dari enkripsi",
"None" => "tidak ada"
);
diff --git a/apps/files_encryption/l10n/is.php b/apps/files_encryption/l10n/is.php
index a2559cf2b76..bd964185c45 100644
--- a/apps/files_encryption/l10n/is.php
+++ b/apps/files_encryption/l10n/is.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Dulkóðun",
-"Exclude the following file types from encryption" => "Undanskilja eftirfarandi skráartegundir frá dulkóðun",
"None" => "Ekkert"
);
diff --git a/apps/files_encryption/l10n/it.php b/apps/files_encryption/l10n/it.php
index 0c394564e0f..ffa20b718d9 100644
--- a/apps/files_encryption/l10n/it.php
+++ b/apps/files_encryption/l10n/it.php
@@ -4,13 +4,9 @@
"Change encryption password to login password" => "Converti la password di cifratura nella password di accesso",
"Please check your passwords and try again." => "Controlla la password e prova ancora.",
"Could not change your file encryption password to your login password" => "Impossibile convertire la password di cifratura nella password di accesso",
-"Choose encryption mode:" => "Scegli la modalità di cifratura.",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Cifratura lato client (più sicura ma rende impossibile accedere ai propri dati dall'interfaccia web)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Cifratura lato server (ti consente di accedere ai tuoi file dall'interfaccia web e dal client desktop)",
-"None (no encryption at all)" => "Nessuna (senza alcuna cifratura)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Importante: una volta selezionata la modalità di cifratura non sarà possibile tornare indietro",
-"User specific (let the user decide)" => "Specificato dall'utente (lascia decidere all'utente)",
"Encryption" => "Cifratura",
-"Exclude the following file types from encryption" => "Escludi i seguenti tipi di file dalla cifratura",
+"File encryption is enabled." => "La cifratura dei file è abilitata.",
+"The following file types will not be encrypted:" => "I seguenti tipi di file non saranno cifrati:",
+"Exclude the following file types from encryption:" => "Escludi i seguenti tipi di file dalla cifratura:",
"None" => "Nessuna"
);
diff --git a/apps/files_encryption/l10n/ja_JP.php b/apps/files_encryption/l10n/ja_JP.php
index 4100908e00c..b7aeb8d8348 100644
--- a/apps/files_encryption/l10n/ja_JP.php
+++ b/apps/files_encryption/l10n/ja_JP.php
@@ -4,13 +4,9 @@
"Change encryption password to login password" => "暗号化パスワードをログインパスワードに変更",
"Please check your passwords and try again." => "パスワードを確認してもう一度行なってください。",
"Could not change your file encryption password to your login password" => "ファイル暗号化パスワードをログインパスワードに変更できませんでした。",
-"Choose encryption mode:" => "暗号化モードを選択:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "クライアントサイドの暗号化(最もセキュアですが、WEBインターフェースからデータにアクセスできなくなります)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "サーバサイド暗号化(WEBインターフェースおよびデスクトップクライアントからファイルにアクセスすることができます)",
-"None (no encryption at all)" => "暗号化無し(何も暗号化しません)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "重要: 一度暗号化を選択してしまうと、もとに戻す方法はありません",
-"User specific (let the user decide)" => "ユーザ指定(ユーザが選べるようにする)",
"Encryption" => "暗号化",
-"Exclude the following file types from encryption" => "暗号化から除外するファイルタイプ",
+"File encryption is enabled." => "ファイルの暗号化は有効です。",
+"The following file types will not be encrypted:" => "次のファイルタイプは暗号化されません:",
+"Exclude the following file types from encryption:" => "次のファイルタイプを暗号化から除外:",
"None" => "なし"
);
diff --git a/apps/files_encryption/l10n/ko.php b/apps/files_encryption/l10n/ko.php
index 901c41e12ec..625906d89d6 100644
--- a/apps/files_encryption/l10n/ko.php
+++ b/apps/files_encryption/l10n/ko.php
@@ -4,13 +4,6 @@
"Change encryption password to login password" => "암호화 암호를 로그인 암호로 변경",
"Please check your passwords and try again." => "암호를 확인한 다음 다시 시도하십시오.",
"Could not change your file encryption password to your login password" => "암호화 암호를 로그인 암호로 변경할 수 없습니다",
-"Choose encryption mode:" => "암호화 모드 선택:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "클라이언트 암호화 (안전하지만 웹에서 데이터에 접근할 수 없음)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "서버 암호화 (웹 및 데스크톱 클라이언트에서 데이터에 접근할 수 있음)",
-"None (no encryption at all)" => "없음 (암호화하지 않음)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "알림: 암호화 모드를 선택하면 다른 것으로 변경할 수 없습니다",
-"User specific (let the user decide)" => "사용자 지정 (사용자별 설정)",
"Encryption" => "암호화",
-"Exclude the following file types from encryption" => "다음 파일 형식은 암호화하지 않음",
"None" => "없음"
);
diff --git a/apps/files_encryption/l10n/ku_IQ.php b/apps/files_encryption/l10n/ku_IQ.php
index 06bb9b93251..02c030014fa 100644
--- a/apps/files_encryption/l10n/ku_IQ.php
+++ b/apps/files_encryption/l10n/ku_IQ.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "نهێنیکردن",
-"Exclude the following file types from encryption" => "به‌ربه‌ست کردنی ئه‌م جۆره‌ په‌ڕگانه له‌ نهێنیکردن",
"None" => "هیچ"
);
diff --git a/apps/files_encryption/l10n/lt_LT.php b/apps/files_encryption/l10n/lt_LT.php
index 22cbe7a4ffa..67769c8f365 100644
--- a/apps/files_encryption/l10n/lt_LT.php
+++ b/apps/files_encryption/l10n/lt_LT.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Šifravimas",
-"Exclude the following file types from encryption" => "Nešifruoti pasirinkto tipo failų",
"None" => "Nieko"
);
diff --git a/apps/files_encryption/l10n/lv.php b/apps/files_encryption/l10n/lv.php
index 7eb21037bb0..1aae1377516 100644
--- a/apps/files_encryption/l10n/lv.php
+++ b/apps/files_encryption/l10n/lv.php
@@ -4,13 +4,9 @@
"Change encryption password to login password" => "Mainīt šifrēšanas paroli uz ierakstīšanās paroli",
"Please check your passwords and try again." => "Lūdzu, pārbaudiet savas paroles un mēģiniet vēlreiz.",
"Could not change your file encryption password to your login password" => "Nevarēja mainīt datņu šifrēšanas paroli uz ierakstīšanās paroli",
-"Choose encryption mode:" => "Izvēlieties šifrēšanas režīmu:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Klienta puses šifrēšana (visdrošākā, bet nav iespējams piekļūt saviem datiem no tīmekļa saskarnes)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Servera puses šifrēšana (ļauj piekļūt datnēm ar tīmekļa saskarni un ar darbvirsmas klientu)",
-"None (no encryption at all)" => "Nav (nekādas šifrēšanas)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Svarīgi — kad esat izvēlējies šifrēšanas režīmu, to nekādi nevar mainīt atpakaļ",
-"User specific (let the user decide)" => "Lietotājam specifiski (ļauj lietotājam izlemt)",
"Encryption" => "Šifrēšana",
-"Exclude the following file types from encryption" => "Sekojošos datņu tipus nešifrēt",
+"File encryption is enabled." => "Datņu šifrēšana ir aktivēta.",
+"The following file types will not be encrypted:" => "Sekojošās datnes netiks šifrētas:",
+"Exclude the following file types from encryption:" => "Sekojošos datņu tipus izslēgt no šifrēšanas:",
"None" => "Nav"
);
diff --git a/apps/files_encryption/l10n/mk.php b/apps/files_encryption/l10n/mk.php
index 7ccf8ac2d5b..513606fadc3 100644
--- a/apps/files_encryption/l10n/mk.php
+++ b/apps/files_encryption/l10n/mk.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Енкрипција",
-"Exclude the following file types from encryption" => "Исклучи ги следните типови на датотеки од енкрипција",
"None" => "Ништо"
);
diff --git a/apps/files_encryption/l10n/nb_NO.php b/apps/files_encryption/l10n/nb_NO.php
index 2ec6670e928..e52ecb868af 100644
--- a/apps/files_encryption/l10n/nb_NO.php
+++ b/apps/files_encryption/l10n/nb_NO.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Kryptering",
-"Exclude the following file types from encryption" => "Ekskluder følgende filer fra kryptering",
"None" => "Ingen"
);
diff --git a/apps/files_encryption/l10n/nl.php b/apps/files_encryption/l10n/nl.php
index 02cb0d970f2..c434330049b 100644
--- a/apps/files_encryption/l10n/nl.php
+++ b/apps/files_encryption/l10n/nl.php
@@ -1,12 +1,12 @@
<?php $TRANSLATIONS = array(
+"Please switch to your ownCloud client and change your encryption password to complete the conversion." => "Schakel om naar uw eigen ownCloud client en wijzig uw versleutelwachtwoord om de conversie af te ronden.",
"switched to client side encryption" => "overgeschakeld naar client side encryptie",
"Change encryption password to login password" => "Verander encryptie wachtwoord naar login wachtwoord",
"Please check your passwords and try again." => "Controleer uw wachtwoorden en probeer het opnieuw.",
"Could not change your file encryption password to your login password" => "Kon het bestandsencryptie wachtwoord niet veranderen naar het login wachtwoord",
-"Choose encryption mode:" => "Kies encryptie mode:",
-"None (no encryption at all)" => "Geen (zonder encryptie)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Belangrijk: Zodra er voor een encryptie mode is gekozen kan deze niet meer worden gewijzigd.",
"Encryption" => "Versleuteling",
-"Exclude the following file types from encryption" => "Versleutel de volgende bestand types niet",
+"File encryption is enabled." => "Bestandsversleuteling geactiveerd.",
+"The following file types will not be encrypted:" => "De volgende bestandstypen zullen niet worden versleuteld:",
+"Exclude the following file types from encryption:" => "Sluit de volgende bestandstypen uit van versleuteling:",
"None" => "Geen"
);
diff --git a/apps/files_encryption/l10n/pl.php b/apps/files_encryption/l10n/pl.php
index 896086108ec..505e8659f08 100644
--- a/apps/files_encryption/l10n/pl.php
+++ b/apps/files_encryption/l10n/pl.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Szyfrowanie",
-"Exclude the following file types from encryption" => "Wyłącz następujące typy plików z szyfrowania",
"None" => "Brak"
);
diff --git a/apps/files_encryption/l10n/pt_BR.php b/apps/files_encryption/l10n/pt_BR.php
index 8bd6492a8f7..356419e0e7f 100644
--- a/apps/files_encryption/l10n/pt_BR.php
+++ b/apps/files_encryption/l10n/pt_BR.php
@@ -4,13 +4,6 @@
"Change encryption password to login password" => "Mudar senha de criptografia para senha de login",
"Please check your passwords and try again." => "Por favor, verifique suas senhas e tente novamente.",
"Could not change your file encryption password to your login password" => "Não foi possível mudar sua senha de criptografia de arquivos para sua senha de login",
-"Choose encryption mode:" => "Escolha o modo de criptografia:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Criptografia por parte do cliente (mais segura, mas torna impossível acessar seus dados a partir da interface web)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Criptografia por parte do servidor (permite que você acesse seus arquivos da interface web e do cliente desktop)",
-"None (no encryption at all)" => "Nenhuma (sem qualquer criptografia)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Importante: Uma vez que tiver escolhido um modo de criptografia, não há um meio de voltar atrás",
-"User specific (let the user decide)" => "Específico por usuário (deixa o usuário decidir)",
"Encryption" => "Criptografia",
-"Exclude the following file types from encryption" => "Excluir os seguintes tipos de arquivo da criptografia",
"None" => "Nenhuma"
);
diff --git a/apps/files_encryption/l10n/pt_PT.php b/apps/files_encryption/l10n/pt_PT.php
index b6eedcdc509..4dac4d2273b 100644
--- a/apps/files_encryption/l10n/pt_PT.php
+++ b/apps/files_encryption/l10n/pt_PT.php
@@ -4,13 +4,6 @@
"Change encryption password to login password" => "Alterar a password de encriptação para a password de login",
"Please check your passwords and try again." => "Por favor verifique as suas paswords e tente de novo.",
"Could not change your file encryption password to your login password" => "Não foi possível alterar a password de encriptação de ficheiros para a sua password de login",
-"Choose encryption mode:" => "Escolha o método de encriptação",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Encriptação do lado do cliente (mais seguro mas torna possível o acesso aos dados através do interface web)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Encriptação do lado do servidor (permite o acesso aos seus ficheiros através do interface web e do cliente de sincronização)",
-"None (no encryption at all)" => "Nenhuma (sem encriptação)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Importante: Uma vez escolhido o modo de encriptação, não existe maneira de o alterar!",
-"User specific (let the user decide)" => "Escolhido pelo utilizador",
"Encryption" => "Encriptação",
-"Exclude the following file types from encryption" => "Excluir da encriptação os seguintes tipo de ficheiros",
"None" => "Nenhum"
);
diff --git a/apps/files_encryption/l10n/ro.php b/apps/files_encryption/l10n/ro.php
index f958692dd8d..9a3acc18dd3 100644
--- a/apps/files_encryption/l10n/ro.php
+++ b/apps/files_encryption/l10n/ro.php
@@ -4,13 +4,6 @@
"Change encryption password to login password" => "Schimbă parola de ecriptare în parolă de acces",
"Please check your passwords and try again." => "Verifică te rog parolele și înceracă din nou.",
"Could not change your file encryption password to your login password" => "Nu s-a putut schimba parola de encripție a fișierelor ca parolă de acces",
-"Choose encryption mode:" => "Alege tipul de ecripție",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Encripție locală (cea mai sigură, dar face ca datele să nu mai fie accesibile din interfața web)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Encripție pe server (permite să accesezi datele tale din interfața web și din clientul pentru calculator)",
-"None (no encryption at all)" => "Fără (nici un fel de ecriptare)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Important: Din moment ce ai setat un mod de encriptare, nu mai există metode de a-l schimba înapoi",
-"User specific (let the user decide)" => "Spefic fiecărui utilizator (lasă utilizatorul să decidă)",
"Encryption" => "Încriptare",
-"Exclude the following file types from encryption" => "Exclude următoarele tipuri de fișiere de la încriptare",
"None" => "Niciuna"
);
diff --git a/apps/files_encryption/l10n/ru.php b/apps/files_encryption/l10n/ru.php
index 14115c12683..651885fe022 100644
--- a/apps/files_encryption/l10n/ru.php
+++ b/apps/files_encryption/l10n/ru.php
@@ -1,5 +1,12 @@
<?php $TRANSLATIONS = array(
+"Please switch to your ownCloud client and change your encryption password to complete the conversion." => "Пожалуйста переключитесь на Ваш клиент ownCloud и поменяйте пароль шиврования для завершения преобразования.",
+"switched to client side encryption" => "переключён на шифрование со стороны клиента",
+"Change encryption password to login password" => "Изменить пароль шифрования для пароля входа",
+"Please check your passwords and try again." => "Пожалуйста проверьте пароли и попробуйте снова.",
+"Could not change your file encryption password to your login password" => "Невозможно изменить Ваш пароль файла шифрования для пароля входа",
"Encryption" => "Шифрование",
-"Exclude the following file types from encryption" => "Исключить шифрование следующих типов файлов",
+"File encryption is enabled." => "Шифрование файла включено.",
+"The following file types will not be encrypted:" => "Следующие типы файлов не будут зашифрованы:",
+"Exclude the following file types from encryption:" => "Исключить следующие типы файлов из шифрованных:",
"None" => "Ничего"
);
diff --git a/apps/files_encryption/l10n/ru_RU.php b/apps/files_encryption/l10n/ru_RU.php
index 1149ac64f3e..dbbb22ed9cf 100644
--- a/apps/files_encryption/l10n/ru_RU.php
+++ b/apps/files_encryption/l10n/ru_RU.php
@@ -2,13 +2,6 @@
"Please switch to your ownCloud client and change your encryption password to complete the conversion." => "Пожалуйста, переключитесь на ownCloud-клиент и измените Ваш пароль шифрования для завершения конвертации.",
"switched to client side encryption" => "переключено на шифрование на клиентской стороне",
"Please check your passwords and try again." => "Пожалуйста, проверьте Ваш пароль и попробуйте снова",
-"Choose encryption mode:" => "Выберите способ шифрования:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Шифрование на стороне клиента (наиболее безопасно, но делает невозможным получение доступа к Вашим данным по вэб-интерфейсу)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Шифрование на стороне сервера (позволяет Вам получить доступ к Вашим файлам по вэб-интерфейсу и десктопному клиенту)",
-"None (no encryption at all)" => "Нет (шифрование полностью отсутствует)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Важно: Невозможно будет изменить выбранный способ шифрования",
-"User specific (let the user decide)" => "Специфика пользователя (позволено решить пользователю)",
"Encryption" => "Шифрование",
-"Exclude the following file types from encryption" => "Исключите следующие типы файлов из шифрования",
"None" => "Ни один"
);
diff --git a/apps/files_encryption/l10n/si_LK.php b/apps/files_encryption/l10n/si_LK.php
index 2d61bec45b8..d9cec4b7220 100644
--- a/apps/files_encryption/l10n/si_LK.php
+++ b/apps/files_encryption/l10n/si_LK.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "ගුප්ත කේතනය",
-"Exclude the following file types from encryption" => "මෙම ගොනු වර්ග ගුප්ත කේතනය කිරීමෙන් බැහැරව තබන්න",
"None" => "කිසිවක් නැත"
);
diff --git a/apps/files_encryption/l10n/sk_SK.php b/apps/files_encryption/l10n/sk_SK.php
index 355b45a4ce2..dc2907e704f 100644
--- a/apps/files_encryption/l10n/sk_SK.php
+++ b/apps/files_encryption/l10n/sk_SK.php
@@ -4,13 +4,9 @@
"Change encryption password to login password" => "Zmeniť šifrovacie heslo na prihlasovacie",
"Please check your passwords and try again." => "Skontrolujte si heslo a skúste to znovu.",
"Could not change your file encryption password to your login password" => "Nie je možné zmeniť šifrovacie heslo na prihlasovacie",
-"Choose encryption mode:" => "Vyberte režim šifrovania:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Šifrovanie prostredníctvom klienta (najbezpečnejšia voľba, neumožňuje však prístup k súborom z webového rozhrania)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Šifrovanie na serveri (umožňuje pristupovať k súborom z webového rozhrania a desktopového klienta)",
-"None (no encryption at all)" => "Žiadne (žiadne šifrovanie)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Dôležité: ak si zvolíte režim šifrovania, nie je možné ho znovu zrušiť",
-"User specific (let the user decide)" => "Definovaný používateľom (umožňuje používateľovi vybrať si)",
"Encryption" => "Šifrovanie",
-"Exclude the following file types from encryption" => "Vynechať nasledujúce súbory pri šifrovaní",
+"File encryption is enabled." => "Kryptovanie súborov nastavené.",
+"The following file types will not be encrypted:" => "Uvedené typy súborov nebudú kryptované:",
+"Exclude the following file types from encryption:" => "Nekryptovať uvedené typy súborov",
"None" => "Žiadne"
);
diff --git a/apps/files_encryption/l10n/sl.php b/apps/files_encryption/l10n/sl.php
index db963ef2f8d..45272f1ee06 100644
--- a/apps/files_encryption/l10n/sl.php
+++ b/apps/files_encryption/l10n/sl.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Šifriranje",
-"Exclude the following file types from encryption" => "Navedene vrste datotek naj ne bodo šifrirane",
"None" => "Brez"
);
diff --git a/apps/files_encryption/l10n/sr.php b/apps/files_encryption/l10n/sr.php
index 198bcc94ef9..91f7fc62a90 100644
--- a/apps/files_encryption/l10n/sr.php
+++ b/apps/files_encryption/l10n/sr.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Шифровање",
-"Exclude the following file types from encryption" => "Не шифруј следеће типове датотека",
"None" => "Ништа"
);
diff --git a/apps/files_encryption/l10n/sv.php b/apps/files_encryption/l10n/sv.php
index 9b6ce141782..e5294974e4e 100644
--- a/apps/files_encryption/l10n/sv.php
+++ b/apps/files_encryption/l10n/sv.php
@@ -4,13 +4,9 @@
"Change encryption password to login password" => "Ändra krypteringslösenord till loginlösenord",
"Please check your passwords and try again." => "Kontrollera dina lösenord och försök igen.",
"Could not change your file encryption password to your login password" => "Kunde inte ändra ditt filkrypteringslösenord till ditt loginlösenord",
-"Choose encryption mode:" => "Välj krypteringsläge:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "Kryptering på klientsidan (säkraste men gör det omöjligt att komma åt dina filer med en webbläsare)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "Kryptering på serversidan (kan komma åt dina filer från webbläsare och datorklient)",
-"None (no encryption at all)" => "Ingen (ingen kryptering alls)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "Viktigt: När du har valt ett krypteringsläge finns det inget sätt att ändra tillbaka",
-"User specific (let the user decide)" => "Användarspecifik (låter användaren bestämma)",
"Encryption" => "Kryptering",
-"Exclude the following file types from encryption" => "Exkludera följande filtyper från kryptering",
+"File encryption is enabled." => "Filkryptering är aktiverat.",
+"The following file types will not be encrypted:" => "Följande filtyper kommer inte att krypteras:",
+"Exclude the following file types from encryption:" => "Exkludera följande filtyper från kryptering:",
"None" => "Ingen"
);
diff --git a/apps/files_encryption/l10n/ta_LK.php b/apps/files_encryption/l10n/ta_LK.php
index aab628b5519..152e631d0fc 100644
--- a/apps/files_encryption/l10n/ta_LK.php
+++ b/apps/files_encryption/l10n/ta_LK.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "மறைக்குறியீடு",
-"Exclude the following file types from encryption" => "மறைக்குறியாக்கலில் பின்வரும் கோப்பு வகைகளை நீக்கவும்",
"None" => "ஒன்றுமில்லை"
);
diff --git a/apps/files_encryption/l10n/th_TH.php b/apps/files_encryption/l10n/th_TH.php
index f8c19456ab3..28d9e30864f 100644
--- a/apps/files_encryption/l10n/th_TH.php
+++ b/apps/files_encryption/l10n/th_TH.php
@@ -4,13 +4,6 @@
"Change encryption password to login password" => "เปลี่ยนรหัสผ่านสำหรับเข้ารหัสไปเป็นรหัสผ่านสำหรับการเข้าสู่ระบบ",
"Please check your passwords and try again." => "กรุณาตรวจสอบรหัสผ่านของคุณแล้วลองใหม่อีกครั้ง",
"Could not change your file encryption password to your login password" => "ไม่สามารถเปลี่ยนรหัสผ่านสำหรับการเข้ารหัสไฟล์ของคุณไปเป็นรหัสผ่านสำหรับการเข้าสู่ระบบของคุณได้",
-"Choose encryption mode:" => "เลือกรูปแบบการเข้ารหัส:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "การเข้ารหัสด้วยโปรแกรมไคลเอนต์ (ปลอดภัยที่สุด แต่จะทำให้คุณไม่สามารถเข้าถึงข้อมูลต่างๆจากหน้าจอเว็บไซต์ได้)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "การเข้ารหัสจากทางฝั่งเซิร์ฟเวอร์ (อนุญาตให้คุณเข้าถึงไฟล์ของคุณจากหน้าจอเว็บไซต์ และโปรแกรมไคลเอนต์จากเครื่องเดสก์ท็อปได้)",
-"None (no encryption at all)" => "ไม่ต้อง (ไม่มีการเข้ารหัสเลย)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "ข้อความสำคัญ: หลังจากที่คุณได้เลือกรูปแบบการเข้ารหัสแล้ว จะไม่สามารถเปลี่ยนกลับมาใหม่ได้อีก",
-"User specific (let the user decide)" => "ให้ผู้ใช้งานเลือกเอง (ปล่อยให้ผู้ใช้งานตัดสินใจเอง)",
"Encryption" => "การเข้ารหัส",
-"Exclude the following file types from encryption" => "ไม่ต้องรวมชนิดของไฟล์ดังต่อไปนี้จากการเข้ารหัส",
"None" => "ไม่ต้อง"
);
diff --git a/apps/files_encryption/l10n/tr.php b/apps/files_encryption/l10n/tr.php
index 07f78d148c8..0868d0a6905 100644
--- a/apps/files_encryption/l10n/tr.php
+++ b/apps/files_encryption/l10n/tr.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Şifreleme",
-"Exclude the following file types from encryption" => "Aşağıdaki dosya tiplerini şifrelemeye dahil etme",
"None" => "Hiçbiri"
);
diff --git a/apps/files_encryption/l10n/uk.php b/apps/files_encryption/l10n/uk.php
index e3589215658..8236c5afefd 100644
--- a/apps/files_encryption/l10n/uk.php
+++ b/apps/files_encryption/l10n/uk.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Шифрування",
-"Exclude the following file types from encryption" => "Не шифрувати файли наступних типів",
"None" => "Жоден"
);
diff --git a/apps/files_encryption/l10n/vi.php b/apps/files_encryption/l10n/vi.php
index 218285b675a..b86cd839783 100644
--- a/apps/files_encryption/l10n/vi.php
+++ b/apps/files_encryption/l10n/vi.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "Mã hóa",
-"Exclude the following file types from encryption" => "Loại trừ các loại tập tin sau đây từ mã hóa",
"None" => "Không có gì hết"
);
diff --git a/apps/files_encryption/l10n/zh_CN.GB2312.php b/apps/files_encryption/l10n/zh_CN.GB2312.php
index 31a3d3b49b8..12d903e6567 100644
--- a/apps/files_encryption/l10n/zh_CN.GB2312.php
+++ b/apps/files_encryption/l10n/zh_CN.GB2312.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "加密",
-"Exclude the following file types from encryption" => "从加密中排除如下文件类型",
"None" => "无"
);
diff --git a/apps/files_encryption/l10n/zh_CN.php b/apps/files_encryption/l10n/zh_CN.php
index aa4817b590c..867d000f2ed 100644
--- a/apps/files_encryption/l10n/zh_CN.php
+++ b/apps/files_encryption/l10n/zh_CN.php
@@ -1,5 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "加密",
-"Exclude the following file types from encryption" => "从加密中排除列出的文件类型",
"None" => "None"
);
diff --git a/apps/files_encryption/l10n/zh_TW.php b/apps/files_encryption/l10n/zh_TW.php
index 146724def08..bd8257ed602 100644
--- a/apps/files_encryption/l10n/zh_TW.php
+++ b/apps/files_encryption/l10n/zh_TW.php
@@ -4,13 +4,6 @@
"Change encryption password to login password" => "將加密密碼修改為登入密碼",
"Please check your passwords and try again." => "請檢查您的密碼並再試一次。",
"Could not change your file encryption password to your login password" => "無法變更您的檔案加密密碼為登入密碼",
-"Choose encryption mode:" => "選擇加密模式:",
-"Client side encryption (most secure but makes it impossible to access your data from the web interface)" => "客戶端加密 (最安全但是會使您無法從網頁界面存取您的檔案)",
-"Server side encryption (allows you to access your files from the web interface and the desktop client)" => "伺服器端加密 (您可以從網頁界面及客戶端程式存取您的檔案)",
-"None (no encryption at all)" => "無 (不加密)",
-"Important: Once you selected an encryption mode there is no way to change it back" => "重要:一旦您選擇了加密就無法再改回來",
-"User specific (let the user decide)" => "使用者自訂 (讓使用者自己決定)",
"Encryption" => "加密",
-"Exclude the following file types from encryption" => "下列的檔案類型不加密",
"None" => "無"
);
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php
index 7eb70d5c8c3..e3d23023db3 100755
--- a/apps/files_encryption/lib/crypt.php
+++ b/apps/files_encryption/lib/crypt.php
@@ -1,92 +1,74 @@
-<?php
-
-/**
- * ownCloud
- *
- * @author Sam Tuke, Frank Karlitschek, Robin Appelman
- * @copyright 2012 Sam Tuke samtuke@owncloud.com,
- * Robin Appelman icewind@owncloud.com, Frank Karlitschek
- * frank@owncloud.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-namespace OCA\Encryption;
-
-require_once 'Crypt_Blowfish/Blowfish.php';
-
-// Todo:
+<?php
+
+/**
+ * ownCloud
+ *
+ * @author Sam Tuke, Frank Karlitschek, Robin Appelman
+ * @copyright 2012 Sam Tuke samtuke@owncloud.com,
+ * Robin Appelman icewind@owncloud.com, Frank Karlitschek
+ * frank@owncloud.org
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\Encryption;
+
+require_once 'Crypt_Blowfish/Blowfish.php';
+
+// Todo:
// - Add a setting "Don´t encrypt files larger than xx because of performance"
// - Don't use a password directly as encryption key. but a key which is
// stored on the server and encrypted with the user password. -> change pass
// faster
-
-/**
- * Class for common cryptography functionality
- */
-
-class Crypt {
-
- /**
- * @brief return encryption mode client or server side encryption
- * @param string user name (use system wide setting if name=null)
- * @return string 'client' or 'server'
- */
- public static function mode( $user = null ) {
-
-// $mode = \OC_Appconfig::getValue( 'files_encryption', 'mode', 'none' );
-//
-// if ( $mode == 'user') {
-// if ( !$user ) {
-// $user = \OCP\User::getUser();
-// }
-// $mode = 'none';
-// if ( $user ) {
-// $query = \OC_DB::prepare( "SELECT mode FROM *PREFIX*encryption WHERE uid = ?" );
-// $result = $query->execute(array($user));
-// if ($row = $result->fetchRow()){
-// $mode = $row['mode'];
-// }
-// }
-// }
-//
-// return $mode;
-
- return 'server';
-
- }
-
- /**
- * @brief Create a new encryption keypair
- * @return array publicKey, privatekey
- */
- public static function createKeypair() {
-
- $res = openssl_pkey_new();
-
- // Get private key
- openssl_pkey_export( $res, $privateKey );
-
- // Get public key
- $publicKey = openssl_pkey_get_details( $res );
-
- $publicKey = $publicKey['key'];
-
- return( array( 'publicKey' => $publicKey, 'privateKey' => $privateKey ) );
-
- }
+
+/**
+ * Class for common cryptography functionality
+ */
+
+class Crypt {
+
+ /**
+ * @brief return encryption mode client or server side encryption
+ * @param string user name (use system wide setting if name=null)
+ * @return string 'client' or 'server'
+ */
+ public static function mode( $user = null ) {
+
+ return 'server';
+
+ }
+
+ /**
+ * @brief Create a new encryption keypair
+ * @return array publicKey, privatekey
+ */
+ public static function createKeypair() {
+
+ $res = openssl_pkey_new();
+
+ // Get private key
+ openssl_pkey_export( $res, $privateKey );
+
+ // Get public key
+ $publicKey = openssl_pkey_get_details( $res );
+
+ $publicKey = $publicKey['key'];
+
+ return( array( 'publicKey' => $publicKey, 'privateKey' => $privateKey ) );
+
+ }
/**
* @brief Add arbitrary padding to encrypted data
@@ -97,88 +79,88 @@ class Crypt {
* blocks with encryption alone, hence padding is added to achieve the
* required length.
*/
- public static function addPadding( $data ) {
-
- $padded = $data . 'xx';
-
- return $padded;
-
- }
-
- /**
- * @brief Remove arbitrary padding to encrypted data
- * @param string $padded padded data to remove padding from
- * @return unpadded data on success, false on error
- */
- public static function removePadding( $padded ) {
-
- if ( substr( $padded, -2 ) == 'xx' ) {
-
- $data = substr( $padded, 0, -2 );
-
- return $data;
-
- } else {
-
- // TODO: log the fact that unpadded data was submitted for removal of padding
- return false;
-
- }
-
- }
-
- /**
- * @brief Check if a file's contents contains an IV and is symmetrically encrypted
- * @return true / false
- * @note see also OCA\Encryption\Util->isEncryptedPath()
- */
- public static function isCatfile( $content ) {
-
- if ( !$content ) {
-
- return false;
-
- }
-
- $noPadding = self::removePadding( $content );
-
- // Fetch encryption metadata from end of file
- $meta = substr( $noPadding, -22 );
-
- // Fetch IV from end of file
- $iv = substr( $meta, -16 );
-
- // Fetch identifier from start of metadata
- $identifier = substr( $meta, 0, 6 );
-
- if ( $identifier == '00iv00') {
-
- return true;
-
- } else {
-
- return false;
-
- }
-
- }
-
- /**
- * Check if a file is encrypted according to database file cache
- * @param string $path
- * @return bool
- */
- public static function isEncryptedMeta( $path ) {
-
- // TODO: Use DI to get \OC\Files\Filesystem out of here
-
- // Fetch all file metadata from DB
- $metadata = \OC\Files\Filesystem::getFileInfo( $path, '' );
-
- // Return encryption status
- return isset( $metadata['encrypted'] ) and ( bool )$metadata['encrypted'];
-
- }
+ public static function addPadding( $data ) {
+
+ $padded = $data . 'xx';
+
+ return $padded;
+
+ }
+
+ /**
+ * @brief Remove arbitrary padding to encrypted data
+ * @param string $padded padded data to remove padding from
+ * @return unpadded data on success, false on error
+ */
+ public static function removePadding( $padded ) {
+
+ if ( substr( $padded, -2 ) == 'xx' ) {
+
+ $data = substr( $padded, 0, -2 );
+
+ return $data;
+
+ } else {
+
+ // TODO: log the fact that unpadded data was submitted for removal of padding
+ return false;
+
+ }
+
+ }
+
+ /**
+ * @brief Check if a file's contents contains an IV and is symmetrically encrypted
+ * @return true / false
+ * @note see also OCA\Encryption\Util->isEncryptedPath()
+ */
+ public static function isCatfile( $content ) {
+
+ if ( !$content ) {
+
+ return false;
+
+ }
+
+ $noPadding = self::removePadding( $content );
+
+ // Fetch encryption metadata from end of file
+ $meta = substr( $noPadding, -22 );
+
+ // Fetch IV from end of file
+ $iv = substr( $meta, -16 );
+
+ // Fetch identifier from start of metadata
+ $identifier = substr( $meta, 0, 6 );
+
+ if ( $identifier == '00iv00') {
+
+ return true;
+
+ } else {
+
+ return false;
+
+ }
+
+ }
+
+ /**
+ * Check if a file is encrypted according to database file cache
+ * @param string $path
+ * @return bool
+ */
+ public static function isEncryptedMeta( $path ) {
+
+ // TODO: Use DI to get \OC\Files\Filesystem out of here
+
+ // Fetch all file metadata from DB
+ $metadata = \OC\Files\Filesystem::getFileInfo( $path, '' );
+
+ // Return encryption status
+ return isset( $metadata['encrypted'] ) and ( bool )$metadata['encrypted'];
+
+ }
/**
* @brief Check if a file is encrypted via legacy system
@@ -188,7 +170,7 @@ class Crypt {
*/
public static function isLegacyEncryptedContent( $data, $relPath ) {
- // Fetch all file metadata from DB
+ // Fetch all file metadata from DB
$metadata = \OC\Files\Filesystem::getFileInfo( $relPath, '' );
// If a file is flagged with encryption in DB, but isn't a
@@ -198,436 +180,436 @@ class Crypt {
isset( $metadata['encrypted'] )
and $metadata['encrypted'] === true
and ! self::isCatfile( $data )
- ) {
-
- return true;
-
- } else {
-
- return false;
-
- }
-
- }
-
- /**
- * @brief Symmetrically encrypt a string
- * @returns encrypted file
- */
- public static function encrypt( $plainContent, $iv, $passphrase = '' ) {
-
- if ( $encryptedContent = openssl_encrypt( $plainContent, 'AES-128-CFB', $passphrase, false, $iv ) ) {
-
- return $encryptedContent;
-
- } else {
-
- \OC_Log::write( 'Encryption library', 'Encryption (symmetric) of content failed', \OC_Log::ERROR );
-
- return false;
-
- }
-
- }
-
- /**
- * @brief Symmetrically decrypt a string
- * @returns decrypted file
- */
- public static function decrypt( $encryptedContent, $iv, $passphrase ) {
-
- if ( $plainContent = openssl_decrypt( $encryptedContent, 'AES-128-CFB', $passphrase, false, $iv ) ) {
-
- return $plainContent;
-
-
- } else {
-
- throw new \Exception( 'Encryption library: Decryption (symmetric) of content failed' );
-
- return false;
-
- }
-
- }
-
- /**
- * @brief Concatenate encrypted data with its IV and padding
- * @param string $content content to be concatenated
- * @param string $iv IV to be concatenated
- * @returns string concatenated content
- */
- public static function concatIv ( $content, $iv ) {
-
- $combined = $content . '00iv00' . $iv;
-
- return $combined;
-
- }
-
- /**
- * @brief Split concatenated data and IV into respective parts
- * @param string $catFile concatenated data to be split
- * @returns array keys: encrypted, iv
- */
- public static function splitIv ( $catFile ) {
-
- // Fetch encryption metadata from end of file
- $meta = substr( $catFile, -22 );
-
- // Fetch IV from end of file
- $iv = substr( $meta, -16 );
-
- // Remove IV and IV identifier text to expose encrypted content
- $encrypted = substr( $catFile, 0, -22 );
-
- $split = array(
- 'encrypted' => $encrypted
- , 'iv' => $iv
- );
-
- return $split;
-
- }
-
- /**
- * @brief Symmetrically encrypts a string and returns keyfile content
- * @param $plainContent content to be encrypted in keyfile
- * @returns encrypted content combined with IV
- * @note IV need not be specified, as it will be stored in the returned keyfile
- * and remain accessible therein.
- */
- public static function symmetricEncryptFileContent( $plainContent, $passphrase = '' ) {
-
- if ( !$plainContent ) {
-
- return false;
-
- }
-
- $iv = self::generateIv();
-
- if ( $encryptedContent = self::encrypt( $plainContent, $iv, $passphrase ) ) {
-
- // Combine content to encrypt with IV identifier and actual IV
- $catfile = self::concatIv( $encryptedContent, $iv );
-
- $padded = self::addPadding( $catfile );
-
- return $padded;
-
- } else {
-
- \OC_Log::write( 'Encryption library', 'Encryption (symmetric) of keyfile content failed', \OC_Log::ERROR );
-
- return false;
-
- }
-
- }
-
-
- /**
- * @brief Symmetrically decrypts keyfile content
- * @param string $source
- * @param string $target
- * @param string $key the decryption key
- * @returns decrypted content
- *
- * This function decrypts a file
- */
- public static function symmetricDecryptFileContent( $keyfileContent, $passphrase = '' ) {
-
- if ( !$keyfileContent ) {
-
- throw new \Exception( 'Encryption library: no data provided for decryption' );
-
- }
-
- // Remove padding
- $noPadding = self::removePadding( $keyfileContent );
-
- // Split into enc data and catfile
- $catfile = self::splitIv( $noPadding );
-
- if ( $plainContent = self::decrypt( $catfile['encrypted'], $catfile['iv'], $passphrase ) ) {
-
- return $plainContent;
-
- }
-
- }
-
- /**
- * @brief Creates symmetric keyfile content using a generated key
- * @param string $plainContent content to be encrypted
- * @returns array keys: key, encrypted
- * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
- *
- * This function decrypts a file
- */
- public static function symmetricEncryptFileContentKeyfile( $plainContent ) {
-
- $key = self::generateKey();
-
- if( $encryptedContent = self::symmetricEncryptFileContent( $plainContent, $key ) ) {
-
- return array(
- 'key' => $key
- , 'encrypted' => $encryptedContent
- );
-
- } else {
-
- return false;
-
- }
-
- }
-
- /**
- * @brief Create asymmetrically encrypted keyfile content using a generated key
- * @param string $plainContent content to be encrypted
- * @returns array keys: key, encrypted
- * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
- *
- * This function decrypts a file
- */
- public static function multiKeyEncrypt( $plainContent, array $publicKeys ) {
-
- // Set empty vars to be set by openssl by reference
- $sealed = '';
- $envKeys = array();
-
- if( openssl_seal( $plainContent, $sealed, $envKeys, $publicKeys ) ) {
-
- return array(
- 'keys' => $envKeys
- , 'encrypted' => $sealed
- );
-
- } else {
-
- return false;
-
- }
-
- }
-
- /**
- * @brief Asymmetrically encrypt a file using multiple public keys
- * @param string $plainContent content to be encrypted
- * @returns string $plainContent decrypted string
- * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
- *
- * This function decrypts a file
- */
- public static function multiKeyDecrypt( $encryptedContent, $envKey, $privateKey ) {
-
- if ( !$encryptedContent ) {
-
- return false;
-
- }
-
- if ( openssl_open( $encryptedContent, $plainContent, $envKey, $privateKey ) ) {
-
- return $plainContent;
-
- } else {
-
- \OC_Log::write( 'Encryption library', 'Decryption (asymmetric) of sealed content failed', \OC_Log::ERROR );
-
- return false;
-
- }
-
- }
-
- /**
- * @brief Asymetrically encrypt a string using a public key
- * @returns encrypted file
- */
- public static function keyEncrypt( $plainContent, $publicKey ) {
-
- openssl_public_encrypt( $plainContent, $encryptedContent, $publicKey );
-
- return $encryptedContent;
-
- }
-
- /**
- * @brief Asymetrically decrypt a file using a private key
- * @returns decrypted file
- */
- public static function keyDecrypt( $encryptedContent, $privatekey ) {
-
- openssl_private_decrypt( $encryptedContent, $plainContent, $privatekey );
-
- return $plainContent;
-
- }
-
- /**
- * @brief Encrypts content symmetrically and generates keyfile asymmetrically
- * @returns array containing catfile and new keyfile.
- * keys: data, key
- * @note this method is a wrapper for combining other crypt class methods
- */
- public static function keyEncryptKeyfile( $plainContent, $publicKey ) {
-
- // Encrypt plain data, generate keyfile & encrypted file
- $cryptedData = self::symmetricEncryptFileContentKeyfile( $plainContent );
-
- // Encrypt keyfile
- $cryptedKey = self::keyEncrypt( $cryptedData['key'], $publicKey );
-
- return array( 'data' => $cryptedData['encrypted'], 'key' => $cryptedKey );
-
- }
-
- /**
- * @brief Takes catfile, keyfile, and private key, and
- * performs decryption
- * @returns decrypted content
- * @note this method is a wrapper for combining other crypt class methods
- */
- public static function keyDecryptKeyfile( $catfile, $keyfile, $privateKey ) {
-
- // Decrypt the keyfile with the user's private key
- $decryptedKeyfile = self::keyDecrypt( $keyfile, $privateKey );
-
- // Decrypt the catfile symmetrically using the decrypted keyfile
- $decryptedData = self::symmetricDecryptFileContent( $catfile, $decryptedKeyfile );
-
- return $decryptedData;
-
- }
-
- /**
- * @brief Symmetrically encrypt a file by combining encrypted component data blocks
- */
- public static function symmetricBlockEncryptFileContent( $plainContent, $key ) {
-
- $crypted = '';
-
- $remaining = $plainContent;
-
- $testarray = array();
-
- while( strlen( $remaining ) ) {
-
- //echo "\n\n\$block = ".substr( $remaining, 0, 6126 );
-
- // Encrypt a chunk of unencrypted data and add it to the rest
- $block = self::symmetricEncryptFileContent( substr( $remaining, 0, 6126 ), $key );
-
- $padded = self::addPadding( $block );
-
- $crypted .= $block;
-
- $testarray[] = $block;
-
- // Remove the data already encrypted from remaining unencrypted data
- $remaining = substr( $remaining, 6126 );
-
- }
-
- //echo "hags ";
-
- //echo "\n\n\n\$crypted = $crypted\n\n\n";
-
- //print_r($testarray);
-
- return $crypted;
-
- }
-
-
- /**
- * @brief Symmetrically decrypt a file by combining encrypted component data blocks
- */
- public static function symmetricBlockDecryptFileContent( $crypted, $key ) {
-
- $decrypted = '';
-
- $remaining = $crypted;
-
- $testarray = array();
-
- while( strlen( $remaining ) ) {
-
- $testarray[] = substr( $remaining, 0, 8192 );
-
- // Decrypt a chunk of unencrypted data and add it to the rest
- $decrypted .= self::symmetricDecryptFileContent( $remaining, $key );
-
- // Remove the data already encrypted from remaining unencrypted data
- $remaining = substr( $remaining, 8192 );
-
- }
-
- //echo "\n\n\$testarray = "; print_r($testarray);
-
- return $decrypted;
-
- }
-
- /**
- * @brief Generates a pseudo random initialisation vector
- * @return String $iv generated IV
- */
- public static function generateIv() {
-
- if ( $random = openssl_random_pseudo_bytes( 12, $strong ) ) {
-
- if ( !$strong ) {
-
- // If OpenSSL indicates randomness is insecure, log error
- \OC_Log::write( 'Encryption library', 'Insecure symmetric key was generated using openssl_random_pseudo_bytes()', \OC_Log::WARN );
-
- }
-
- // We encode the iv purely for string manipulation
- // purposes - it gets decoded before use
- $iv = base64_encode( $random );
-
- return $iv;
-
- } else {
-
- throw new Exception( 'Generating IV failed' );
-
- }
-
- }
-
- /**
- * @brief Generate a pseudo random 1024kb ASCII key
- * @returns $key Generated key
- */
- public static function generateKey() {
-
- // Generate key
- if ( $key = base64_encode( openssl_random_pseudo_bytes( 183, $strong ) ) ) {
-
- if ( !$strong ) {
-
- // If OpenSSL indicates randomness is insecure, log error
- throw new Exception ( 'Encryption library, Insecure symmetric key was generated using openssl_random_pseudo_bytes()' );
-
- }
-
- return $key;
-
- } else {
-
- return false;
-
- }
-
- }
-
+ ) {
+
+ return true;
+
+ } else {
+
+ return false;
+
+ }
+
+ }
+
+ /**
+ * @brief Symmetrically encrypt a string
+ * @returns encrypted file
+ */
+ public static function encrypt( $plainContent, $iv, $passphrase = '' ) {
+
+ if ( $encryptedContent = openssl_encrypt( $plainContent, 'AES-128-CFB', $passphrase, false, $iv ) ) {
+
+ return $encryptedContent;
+
+ } else {
+
+ \OC_Log::write( 'Encryption library', 'Encryption (symmetric) of content failed', \OC_Log::ERROR );
+
+ return false;
+
+ }
+
+ }
+
+ /**
+ * @brief Symmetrically decrypt a string
+ * @returns decrypted file
+ */
+ public static function decrypt( $encryptedContent, $iv, $passphrase ) {
+
+ if ( $plainContent = openssl_decrypt( $encryptedContent, 'AES-128-CFB', $passphrase, false, $iv ) ) {
+
+ return $plainContent;
+
+
+ } else {
+
+ throw new \Exception( 'Encryption library: Decryption (symmetric) of content failed' );
+
+ return false;
+
+ }
+
+ }
+
+ /**
+ * @brief Concatenate encrypted data with its IV and padding
+ * @param string $content content to be concatenated
+ * @param string $iv IV to be concatenated
+ * @returns string concatenated content
+ */
+ public static function concatIv ( $content, $iv ) {
+
+ $combined = $content . '00iv00' . $iv;
+
+ return $combined;
+
+ }
+
+ /**
+ * @brief Split concatenated data and IV into respective parts
+ * @param string $catFile concatenated data to be split
+ * @returns array keys: encrypted, iv
+ */
+ public static function splitIv ( $catFile ) {
+
+ // Fetch encryption metadata from end of file
+ $meta = substr( $catFile, -22 );
+
+ // Fetch IV from end of file
+ $iv = substr( $meta, -16 );
+
+ // Remove IV and IV identifier text to expose encrypted content
+ $encrypted = substr( $catFile, 0, -22 );
+
+ $split = array(
+ 'encrypted' => $encrypted
+ , 'iv' => $iv
+ );
+
+ return $split;
+
+ }
+
+ /**
+ * @brief Symmetrically encrypts a string and returns keyfile content
+ * @param $plainContent content to be encrypted in keyfile
+ * @returns encrypted content combined with IV
+ * @note IV need not be specified, as it will be stored in the returned keyfile
+ * and remain accessible therein.
+ */
+ public static function symmetricEncryptFileContent( $plainContent, $passphrase = '' ) {
+
+ if ( !$plainContent ) {
+
+ return false;
+
+ }
+
+ $iv = self::generateIv();
+
+ if ( $encryptedContent = self::encrypt( $plainContent, $iv, $passphrase ) ) {
+
+ // Combine content to encrypt with IV identifier and actual IV
+ $catfile = self::concatIv( $encryptedContent, $iv );
+
+ $padded = self::addPadding( $catfile );
+
+ return $padded;
+
+ } else {
+
+ \OC_Log::write( 'Encryption library', 'Encryption (symmetric) of keyfile content failed', \OC_Log::ERROR );
+
+ return false;
+
+ }
+
+ }
+
+
+ /**
+ * @brief Symmetrically decrypts keyfile content
+ * @param string $source
+ * @param string $target
+ * @param string $key the decryption key
+ * @returns decrypted content
+ *
+ * This function decrypts a file
+ */
+ public static function symmetricDecryptFileContent( $keyfileContent, $passphrase = '' ) {
+
+ if ( !$keyfileContent ) {
+
+ throw new \Exception( 'Encryption library: no data provided for decryption' );
+
+ }
+
+ // Remove padding
+ $noPadding = self::removePadding( $keyfileContent );
+
+ // Split into enc data and catfile
+ $catfile = self::splitIv( $noPadding );
+
+ if ( $plainContent = self::decrypt( $catfile['encrypted'], $catfile['iv'], $passphrase ) ) {
+
+ return $plainContent;
+
+ }
+
+ }
+
+ /**
+ * @brief Creates symmetric keyfile content using a generated key
+ * @param string $plainContent content to be encrypted
+ * @returns array keys: key, encrypted
+ * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
+ *
+ * This function decrypts a file
+ */
+ public static function symmetricEncryptFileContentKeyfile( $plainContent ) {
+
+ $key = self::generateKey();
+
+ if( $encryptedContent = self::symmetricEncryptFileContent( $plainContent, $key ) ) {
+
+ return array(
+ 'key' => $key
+ , 'encrypted' => $encryptedContent
+ );
+
+ } else {
+
+ return false;
+
+ }
+
+ }
+
+ /**
+ * @brief Create asymmetrically encrypted keyfile content using a generated key
+ * @param string $plainContent content to be encrypted
+ * @returns array keys: key, encrypted
+ * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
+ *
+ * This function decrypts a file
+ */
+ public static function multiKeyEncrypt( $plainContent, array $publicKeys ) {
+
+ // Set empty vars to be set by openssl by reference
+ $sealed = '';
+ $envKeys = array();
+
+ if( openssl_seal( $plainContent, $sealed, $envKeys, $publicKeys ) ) {
+
+ return array(
+ 'keys' => $envKeys
+ , 'encrypted' => $sealed
+ );
+
+ } else {
+
+ return false;
+
+ }
+
+ }
+
+ /**
+ * @brief Asymmetrically encrypt a file using multiple public keys
+ * @param string $plainContent content to be encrypted
+ * @returns string $plainContent decrypted string
+ * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
+ *
+ * This function decrypts a file
+ */
+ public static function multiKeyDecrypt( $encryptedContent, $envKey, $privateKey ) {
+
+ if ( !$encryptedContent ) {
+
+ return false;
+
+ }
+
+ if ( openssl_open( $encryptedContent, $plainContent, $envKey, $privateKey ) ) {
+
+ return $plainContent;
+
+ } else {
+
+ \OC_Log::write( 'Encryption library', 'Decryption (asymmetric) of sealed content failed', \OC_Log::ERROR );
+
+ return false;
+
+ }
+
+ }
+
+ /**
+ * @brief Asymetrically encrypt a string using a public key
+ * @returns encrypted file
+ */
+ public static function keyEncrypt( $plainContent, $publicKey ) {
+
+ openssl_public_encrypt( $plainContent, $encryptedContent, $publicKey );
+
+ return $encryptedContent;
+
+ }
+
+ /**
+ * @brief Asymetrically decrypt a file using a private key
+ * @returns decrypted file
+ */
+ public static function keyDecrypt( $encryptedContent, $privatekey ) {
+
+ openssl_private_decrypt( $encryptedContent, $plainContent, $privatekey );
+
+ return $plainContent;
+
+ }
+
+ /**
+ * @brief Encrypts content symmetrically and generates keyfile asymmetrically
+ * @returns array containing catfile and new keyfile.
+ * keys: data, key
+ * @note this method is a wrapper for combining other crypt class methods
+ */
+ public static function keyEncryptKeyfile( $plainContent, $publicKey ) {
+
+ // Encrypt plain data, generate keyfile & encrypted file
+ $cryptedData = self::symmetricEncryptFileContentKeyfile( $plainContent );
+
+ // Encrypt keyfile
+ $cryptedKey = self::keyEncrypt( $cryptedData['key'], $publicKey );
+
+ return array( 'data' => $cryptedData['encrypted'], 'key' => $cryptedKey );
+
+ }
+
+ /**
+ * @brief Takes catfile, keyfile, and private key, and
+ * performs decryption
+ * @returns decrypted content
+ * @note this method is a wrapper for combining other crypt class methods
+ */
+ public static function keyDecryptKeyfile( $catfile, $keyfile, $privateKey ) {
+
+ // Decrypt the keyfile with the user's private key
+ $decryptedKeyfile = self::keyDecrypt( $keyfile, $privateKey );
+
+ // Decrypt the catfile symmetrically using the decrypted keyfile
+ $decryptedData = self::symmetricDecryptFileContent( $catfile, $decryptedKeyfile );
+
+ return $decryptedData;
+
+ }
+
+ /**
+ * @brief Symmetrically encrypt a file by combining encrypted component data blocks
+ */
+ public static function symmetricBlockEncryptFileContent( $plainContent, $key ) {
+
+ $crypted = '';
+
+ $remaining = $plainContent;
+
+ $testarray = array();
+
+ while( strlen( $remaining ) ) {
+
+ //echo "\n\n\$block = ".substr( $remaining, 0, 6126 );
+
+ // Encrypt a chunk of unencrypted data and add it to the rest
+ $block = self::symmetricEncryptFileContent( substr( $remaining, 0, 6126 ), $key );
+
+ $padded = self::addPadding( $block );
+
+ $crypted .= $block;
+
+ $testarray[] = $block;
+
+ // Remove the data already encrypted from remaining unencrypted data
+ $remaining = substr( $remaining, 6126 );
+
+ }
+
+ //echo "hags ";
+
+ //echo "\n\n\n\$crypted = $crypted\n\n\n";
+
+ //print_r($testarray);
+
+ return $crypted;
+
+ }
+
+
+ /**
+ * @brief Symmetrically decrypt a file by combining encrypted component data blocks
+ */
+ public static function symmetricBlockDecryptFileContent( $crypted, $key ) {
+
+ $decrypted = '';
+
+ $remaining = $crypted;
+
+ $testarray = array();
+
+ while( strlen( $remaining ) ) {
+
+ $testarray[] = substr( $remaining, 0, 8192 );
+
+ // Decrypt a chunk of unencrypted data and add it to the rest
+ $decrypted .= self::symmetricDecryptFileContent( $remaining, $key );
+
+ // Remove the data already encrypted from remaining unencrypted data
+ $remaining = substr( $remaining, 8192 );
+
+ }
+
+ //echo "\n\n\$testarray = "; print_r($testarray);
+
+ return $decrypted;
+
+ }
+
+ /**
+ * @brief Generates a pseudo random initialisation vector
+ * @return String $iv generated IV
+ */
+ public static function generateIv() {
+
+ if ( $random = openssl_random_pseudo_bytes( 12, $strong ) ) {
+
+ if ( !$strong ) {
+
+ // If OpenSSL indicates randomness is insecure, log error
+ \OC_Log::write( 'Encryption library', 'Insecure symmetric key was generated using openssl_random_pseudo_bytes()', \OC_Log::WARN );
+
+ }
+
+ // We encode the iv purely for string manipulation
+ // purposes - it gets decoded before use
+ $iv = base64_encode( $random );
+
+ return $iv;
+
+ } else {
+
+ throw new Exception( 'Generating IV failed' );
+
+ }
+
+ }
+
+ /**
+ * @brief Generate a pseudo random 1024kb ASCII key
+ * @returns $key Generated key
+ */
+ public static function generateKey() {
+
+ // Generate key
+ if ( $key = base64_encode( openssl_random_pseudo_bytes( 183, $strong ) ) ) {
+
+ if ( !$strong ) {
+
+ // If OpenSSL indicates randomness is insecure, log error
+ throw new Exception ( 'Encryption library, Insecure symmetric key was generated using openssl_random_pseudo_bytes()' );
+
+ }
+
+ return $key;
+
+ } else {
+
+ return false;
+
+ }
+
+ }
+
public static function changekeypasscode( $oldPassword, $newPassword ) {
if ( \OCP\User::isLoggedIn() ) {
@@ -651,98 +633,96 @@ class Crypt {
}
- /**
- * @brief Get the blowfish encryption handeler for a key
- * @param $key string (optional)
- * @return Crypt_Blowfish blowfish object
- *
- * if the key is left out, the default handeler will be used
- */
- public static function getBlowfish( $key = '' ) {
-
- if ( $key ) {
-
- return new \Crypt_Blowfish( $key );
-
- } else {
-
- return false;
-
- }
-
- }
-
- public static function legacyCreateKey( $passphrase ) {
-
- // Generate a random integer
- $key = mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 );
-
- // Encrypt the key with the passphrase
- $legacyEncKey = self::legacyEncrypt( $key, $passphrase );
-
- return $legacyEncKey;
-
- }
-
- /**
- * @brief encrypts content using legacy blowfish system
- * @param $content the cleartext message you want to encrypt
- * @param $key the encryption key (optional)
- * @returns encrypted content
- *
- * This function encrypts an content
- */
- public static function legacyEncrypt( $content, $passphrase = '' ) {
-
- $bf = self::getBlowfish( $passphrase );
-
- return $bf->encrypt( $content );
-
- }
-
- /**
- * @brief decrypts content using legacy blowfish system
- * @param $content the cleartext message you want to decrypt
- * @param $key the encryption key (optional)
- * @returns cleartext content
- *
- * This function decrypts an content
- */
- public static function legacyDecrypt( $content, $passphrase = '' ) {
-
- $bf = self::getBlowfish( $passphrase );
-
- $decrypted = $bf->decrypt( $content );
-
- $trimmed = rtrim( $decrypted, "\0" );
-
- return $trimmed;
-
- }
-
- public static function legacyKeyRecryptKeyfile( $legacyEncryptedContent, $legacyPassphrase, $publicKey, $newPassphrase ) {
-
- $decrypted = self::legacyDecrypt( $legacyEncryptedContent, $legacyPassphrase );
-
- $recrypted = self::keyEncryptKeyfile( $decrypted, $publicKey );
-
- return $recrypted;
-
- }
-
- /**
- * @brief Re-encryptes a legacy blowfish encrypted file using AES with integrated IV
- * @param $legacyContent the legacy encrypted content to re-encrypt
- * @returns cleartext content
- *
- * This function decrypts an content
- */
- public static function legacyRecrypt( $legacyContent, $legacyPassphrase, $newPassphrase ) {
-
- // TODO: write me
-
- }
-
-}
-
-?> \ No newline at end of file
+ /**
+ * @brief Get the blowfish encryption handeler for a key
+ * @param $key string (optional)
+ * @return Crypt_Blowfish blowfish object
+ *
+ * if the key is left out, the default handeler will be used
+ */
+ public static function getBlowfish( $key = '' ) {
+
+ if ( $key ) {
+
+ return new \Crypt_Blowfish( $key );
+
+ } else {
+
+ return false;
+
+ }
+
+ }
+
+ public static function legacyCreateKey( $passphrase ) {
+
+ // Generate a random integer
+ $key = mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 );
+
+ // Encrypt the key with the passphrase
+ $legacyEncKey = self::legacyEncrypt( $key, $passphrase );
+
+ return $legacyEncKey;
+
+ }
+
+ /**
+ * @brief encrypts content using legacy blowfish system
+ * @param $content the cleartext message you want to encrypt
+ * @param $key the encryption key (optional)
+ * @returns encrypted content
+ *
+ * This function encrypts an content
+ */
+ public static function legacyEncrypt( $content, $passphrase = '' ) {
+
+ $bf = self::getBlowfish( $passphrase );
+
+ return $bf->encrypt( $content );
+
+ }
+
+ /**
+ * @brief decrypts content using legacy blowfish system
+ * @param $content the cleartext message you want to decrypt
+ * @param $key the encryption key (optional)
+ * @returns cleartext content
+ *
+ * This function decrypts an content
+ */
+ public static function legacyDecrypt( $content, $passphrase = '' ) {
+
+ $bf = self::getBlowfish( $passphrase );
+
+ $decrypted = $bf->decrypt( $content );
+
+ $trimmed = rtrim( $decrypted, "\0" );
+
+ return $trimmed;
+
+ }
+
+ public static function legacyKeyRecryptKeyfile( $legacyEncryptedContent, $legacyPassphrase, $publicKey, $newPassphrase ) {
+
+ $decrypted = self::legacyDecrypt( $legacyEncryptedContent, $legacyPassphrase );
+
+ $recrypted = self::keyEncryptKeyfile( $decrypted, $publicKey );
+
+ return $recrypted;
+
+ }
+
+ /**
+ * @brief Re-encryptes a legacy blowfish encrypted file using AES with integrated IV
+ * @param $legacyContent the legacy encrypted content to re-encrypt
+ * @returns cleartext content
+ *
+ * This function decrypts an content
+ */
+ public static function legacyRecrypt( $legacyContent, $legacyPassphrase, $newPassphrase ) {
+
+ // TODO: write me
+
+ }
+
+} \ No newline at end of file
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 5158d6e856c..52bc74db27a 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -69,11 +69,6 @@ class Util {
//// DONE: add method to fetch legacy key
//// DONE: add method to decrypt legacy encrypted data
- //// TODO: add method to encrypt all user files using new system
- //// TODO: add method to decrypt all user files using new system
- //// TODO: add method to encrypt all user files using old system
- //// TODO: add method to decrypt all user files using old system
-
// Admin UI:
@@ -93,7 +88,6 @@ class Util {
// Integration testing:
- //// TODO: test new encryption with webdav
//// TODO: test new encryption with versioning
//// TODO: test new encryption with sharing
//// TODO: test new encryption with proxies
@@ -278,7 +272,7 @@ class Util {
// will eat server resources :(
if (
Keymanager::getFileKey( $this->view, $this->userId, $file )
- && Crypt::isCatfile( $filePath )
+ && Crypt::isCatfile( $data )
) {
$found['encrypted'][] = array( 'name' => $file, 'path' => $filePath );
@@ -391,7 +385,6 @@ class Util {
}
- // FIXME: Legacy recrypting here isn't finished yet
// Encrypt legacy encrypted files
if (
! empty( $legacyPassphrase )
@@ -437,30 +430,11 @@ class Util {
}
- public static function changekeypasscode( $oldPassword, $newPassword ) {
-
- if( \OCP\User::isLoggedIn() ) {
-
- $key = Keymanager::getPrivateKey( $this->userId, $this->view );
-
- if ( ( $key = Crypt::symmetricDecryptFileContent( $key, $oldPassword ) ) ) {
-
- if ( ( $key = Crypt::symmetricEncryptFileContent( $key, $newPassword )) ) {
-
- Keymanager::setPrivateKey( $key );
-
- return true;
-
- }
-
- }
-
- }
-
- return false;
-
- }
-
+ /**
+ * @brief Return important encryption related paths
+ * @param string $pathName Name of the directory to return the path of
+ * @return string path
+ */
public function getPath( $pathName ) {
switch ( $pathName ) {