From 3ab4ddd1da8a1d9c919a38c15770e14fbeda5ea2 Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Thu, 26 Jul 2012 13:47:43 +0200
Subject: [PATCH] function to ask for the encryption mode (server side or
 client side). Needs to be implemented and integrated into the settings.

---
 apps/files_encryption/lib/crypt.php | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php
index 668101014a..090b1db061 100644
--- a/apps/files_encryption/lib/crypt.php
+++ b/apps/files_encryption/lib/crypt.php
@@ -30,6 +30,17 @@ namespace OCA_Encryption;
 
 class Crypt {
 
+	/**
+	 * @brief return encryption mode client or server side encryption
+	 * @param string user name 
+	 * @return string 'client' or 'server'
+	 */
+	public static function mode($user) {
+		//TODO: allow user to set encryption mode and check the selection of the user
+		// for the moment I just return 'client' for test purposes
+		return 'client';
+	}
+	
         /**
          * @brief Create a new encryption keypair
          * @return array publicKey, privatekey
-- 
GitLab