summaryrefslogtreecommitdiffstats
path: root/lib/public/encryption
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-03-17 13:11:38 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:27 +0200
commit5bc9ababeb06c3e901b7d11b8c2c1d44865d3339 (patch)
tree9dffc7074a65dc019b1b0eb177d04475a6568d32 /lib/public/encryption
parent39733c8da1c12cc79b7d650edf2ea1074330ee5f (diff)
downloadnextcloud-server-5bc9ababeb06c3e901b7d11b8c2c1d44865d3339.tar.gz
nextcloud-server-5bc9ababeb06c3e901b7d11b8c2c1d44865d3339.zip
fix keystorage and add unit tests
Diffstat (limited to 'lib/public/encryption')
-rw-r--r--lib/public/encryption/ikeystorage.php93
-rw-r--r--lib/public/encryption/keys/istorage.php2
2 files changed, 1 insertions, 94 deletions
diff --git a/lib/public/encryption/ikeystorage.php b/lib/public/encryption/ikeystorage.php
deleted file mode 100644
index 2ab5048709e..00000000000
--- a/lib/public/encryption/ikeystorage.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-
-/**
- * ownCloud
- *
- * @copyright (C) 2015 ownCloud, Inc.
- *
- * @author Bjoern Schiessle <schiessle@owncloud.com>
- *
- * 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 OCP\Encryption;
-
-interface IKeyStorage {
-
- /**
- * get user specific key
- *
- * @param string $uid ID if the user for whom we want the key
- * @param string $keyId id of the key
- *
- * @return mixed key
- */
- public function getUserKey($uid, $keyId);
-
- /**
- * get file specific key
- *
- * @param string $path path to file
- * @param string $keyId id of the key
- *
- * @return mixed key
- */
- public function getFileKey($path, $keyId);
-
- /**
- * get system-wide encryption keys not related to a specific user,
- * e.g something like a key for public link shares
- *
- * @param string $keyId id of the key
- *
- * @return mixed key
- */
- public function getSystemUserKey($keyId);
-
- /**
- * set user specific key
- *
- * @param string $uid ID if the user for whom we want the key
- * @param string $keyId id of the key
- * @param mixed $key
- */
- public function setUserKey($uid, $keyId, $key);
-
- /**
- * set file specific key
- *
- * @param string $path path to file
- * @param string $keyId id of the key
- * @param mixed $key
- */
- public function setFileKey($path, $keyId, $key);
-
- /**
- * set system-wide encryption keys not related to a specific user,
- * e.g something like a key for public link shares
- *
- * @param string $keyId id of the key
- * @param mixed $key
- *
- * @return mixed key
- */
- public function setSystemUserKey($keyId, $key);
-
- /**
- * Return if encryption is setup and ready encrypt things
- *
- * @return bool
- */
- public function ready();
-}
diff --git a/lib/public/encryption/keys/istorage.php b/lib/public/encryption/keys/istorage.php
index 4c2b01f4ad0..c4c970804e9 100644
--- a/lib/public/encryption/keys/istorage.php
+++ b/lib/public/encryption/keys/istorage.php
@@ -69,7 +69,7 @@ interface IStorage {
*
* @param string $path path to file
* @param string $keyId id of the key
- * @param boolean
+ * @param mixed $key
*/
public function setFileKey($path, $keyId, $key);