summaryrefslogtreecommitdiffstats
path: root/lib/public/encryption
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-16 17:00:08 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-16 17:00:08 +0200
commit7644950b48b094bfe5675348aefb7cf5747d325b (patch)
treea1792e21239a86f471da99b454134a5d8533ef77 /lib/public/encryption
parent8653da6c16597959c7bd0f0b202747ff96204575 (diff)
downloadnextcloud-server-7644950b48b094bfe5675348aefb7cf5747d325b.tar.gz
nextcloud-server-7644950b48b094bfe5675348aefb7cf5747d325b.zip
Add @since tags to all methods in public namespace
* enhance the app development experience - you can look up the method introduction right inside the code without searching via git blame * easier to write apps for multiple versions
Diffstat (limited to 'lib/public/encryption')
-rw-r--r--lib/public/encryption/exceptions/genericencryptionexception.php8
-rw-r--r--lib/public/encryption/iencryptionmodule.php15
-rw-r--r--lib/public/encryption/ifile.php7
-rw-r--r--lib/public/encryption/imanager.php8
-rw-r--r--lib/public/encryption/keys/istorage.php18
5 files changed, 55 insertions, 1 deletions
diff --git a/lib/public/encryption/exceptions/genericencryptionexception.php b/lib/public/encryption/exceptions/genericencryptionexception.php
index c488d4df162..be96450d431 100644
--- a/lib/public/encryption/exceptions/genericencryptionexception.php
+++ b/lib/public/encryption/exceptions/genericencryptionexception.php
@@ -22,13 +22,19 @@
namespace OCP\Encryption\Exceptions;
-
+/**
+ * Class GenericEncryptionException
+ *
+ * @package OCP\Encryption\Exceptions
+ * @since 8.1.0
+ */
class GenericEncryptionException extends \Exception {
/**
* @param string $message
* @param int $code
* @param \Exception $previous
+ * @since 8.1.0
*/
public function __construct($message = '', $code = 0, \Exception $previous = null) {
if (empty($message)) {
diff --git a/lib/public/encryption/iencryptionmodule.php b/lib/public/encryption/iencryptionmodule.php
index d22ca0ec86c..dc55f8939ef 100644
--- a/lib/public/encryption/iencryptionmodule.php
+++ b/lib/public/encryption/iencryptionmodule.php
@@ -21,10 +21,17 @@
namespace OCP\Encryption;
+/**
+ * Interface IEncryptionModule
+ *
+ * @package OCP\Encryption
+ * @since 8.1.0
+ */
interface IEncryptionModule {
/**
* @return string defining the technical unique id
+ * @since 8.1.0
*/
public function getId();
@@ -32,6 +39,7 @@ interface IEncryptionModule {
* In comparison to getKey() this function returns a human readable (maybe translated) name
*
* @return string
+ * @since 8.1.0
*/
public function getDisplayName();
@@ -48,6 +56,7 @@ interface IEncryptionModule {
* $return array $header contain data as key-value pairs which should be
* written to the header, in case of a write operation
* or if no additional data is needed return a empty array
+ * @since 8.1.0
*/
public function begin($path, $user, array $header, array $accessList);
@@ -59,6 +68,7 @@ interface IEncryptionModule {
* @param string $path to the file
* @return string remained data which should be written to the file in case
* of a write operation
+ * @since 8.1.0
*/
public function end($path);
@@ -67,6 +77,7 @@ interface IEncryptionModule {
*
* @param string $data you want to encrypt
* @return mixed encrypted data
+ * @since 8.1.0
*/
public function encrypt($data);
@@ -75,6 +86,7 @@ interface IEncryptionModule {
*
* @param string $data you want to decrypt
* @return mixed decrypted data
+ * @since 8.1.0
*/
public function decrypt($data);
@@ -85,6 +97,7 @@ interface IEncryptionModule {
* @param string $uid of the user who performs the operation
* @param array $accessList who has access to the file contains the key 'users' and 'public'
* @return boolean
+ * @since 8.1.0
*/
public function update($path, $uid, array $accessList);
@@ -93,6 +106,7 @@ interface IEncryptionModule {
*
* @param string $path
* @return boolean
+ * @since 8.1.0
*/
public function shouldEncrypt($path);
@@ -101,6 +115,7 @@ interface IEncryptionModule {
* ownCloud read/write files with a block size of 8192 byte
*
* @return integer
+ * @since 8.1.0
*/
public function getUnencryptedBlockSize();
}
diff --git a/lib/public/encryption/ifile.php b/lib/public/encryption/ifile.php
index cc1e8f426b2..8b3f0fa4bf3 100644
--- a/lib/public/encryption/ifile.php
+++ b/lib/public/encryption/ifile.php
@@ -22,6 +22,12 @@
namespace OCP\Encryption;
+/**
+ * Interface IFile
+ *
+ * @package OCP\Encryption
+ * @since 8.1.0
+ */
interface IFile {
/**
@@ -29,6 +35,7 @@ interface IFile {
*
* @param string $path to the file
* @return array
+ * @since 8.1.0
*/
public function getAccessList($path);
diff --git a/lib/public/encryption/imanager.php b/lib/public/encryption/imanager.php
index 3dcdbf5d03a..badc91c9023 100644
--- a/lib/public/encryption/imanager.php
+++ b/lib/public/encryption/imanager.php
@@ -27,6 +27,7 @@ use OC\Encryption\Exceptions\ModuleAlreadyExistsException;
/**
* This class provides access to files encryption apps.
*
+ * @since 8.1.0
*/
interface IManager {
@@ -34,6 +35,7 @@ interface IManager {
* Check if encryption is available (at least one encryption module needs to be enabled)
*
* @return bool true if enabled, false if not
+ * @since 8.1.0
*/
function isEnabled();
@@ -42,6 +44,7 @@ interface IManager {
*
* @param IEncryptionModule $module
* @throws ModuleAlreadyExistsException
+ * @since 8.1.0
*/
function registerEncryptionModule(IEncryptionModule $module);
@@ -49,6 +52,7 @@ interface IManager {
* Unregisters an encryption module
*
* @param IEncryptionModule $module
+ * @since 8.1.0
*/
function unregisterEncryptionModule(IEncryptionModule $module);
@@ -56,6 +60,7 @@ interface IManager {
* get a list of all encryption modules
*
* @return array
+ * @since 8.1.0
*/
function getEncryptionModules();
@@ -66,6 +71,7 @@ interface IManager {
* @param string $moduleId
* @return IEncryptionModule
* @throws ModuleDoesNotExistsException
+ * @since 8.1.0
*/
function getEncryptionModule($moduleId);
@@ -74,6 +80,7 @@ interface IManager {
*
* @return \OCP\Encryption\IEncryptionModule
* @throws ModuleDoesNotExistsException
+ * @since 8.1.0
*/
public function getDefaultEncryptionModule();
@@ -82,6 +89,7 @@ interface IManager {
*
* @param string $moduleId
* @return string
+ * @since 8.1.0
*/
public function setDefaultEncryptionModule($moduleId);
diff --git a/lib/public/encryption/keys/istorage.php b/lib/public/encryption/keys/istorage.php
index c6933e7afab..3e497ed2c75 100644
--- a/lib/public/encryption/keys/istorage.php
+++ b/lib/public/encryption/keys/istorage.php
@@ -22,6 +22,12 @@
namespace OCP\Encryption\Keys;
+/**
+ * Interface IStorage
+ *
+ * @package OCP\Encryption\Keys
+ * @since 8.1.0
+ */
interface IStorage {
/**
@@ -31,6 +37,7 @@ interface IStorage {
* @param string $keyId id of the key
*
* @return mixed key
+ * @since 8.1.0
*/
public function getUserKey($uid, $keyId);
@@ -41,6 +48,7 @@ interface IStorage {
* @param string $keyId id of the key
*
* @return mixed key
+ * @since 8.1.0
*/
public function getFileKey($path, $keyId);
@@ -51,6 +59,7 @@ interface IStorage {
* @param string $keyId id of the key
*
* @return mixed key
+ * @since 8.1.0
*/
public function getSystemUserKey($keyId);
@@ -60,6 +69,7 @@ interface IStorage {
* @param string $uid ID if the user for whom we want the key
* @param string $keyId id of the key
* @param mixed $key
+ * @since 8.1.0
*/
public function setUserKey($uid, $keyId, $key);
@@ -69,6 +79,7 @@ interface IStorage {
* @param string $path path to file
* @param string $keyId id of the key
* @param boolean
+ * @since 8.1.0
*/
public function setFileKey($path, $keyId, $key);
@@ -80,6 +91,7 @@ interface IStorage {
* @param mixed $key
*
* @return mixed key
+ * @since 8.1.0
*/
public function setSystemUserKey($keyId, $key);
@@ -90,6 +102,7 @@ interface IStorage {
* @param string $keyId id of the key
*
* @return boolean False when the key could not be deleted
+ * @since 8.1.0
*/
public function deleteUserKey($uid, $keyId);
@@ -100,6 +113,7 @@ interface IStorage {
* @param string $keyId id of the key
*
* @return boolean False when the key could not be deleted
+ * @since 8.1.0
*/
public function deleteFileKey($path, $keyId);
@@ -108,6 +122,7 @@ interface IStorage {
*
* @param string $path to the file
* @return boolean False when the keys could not be deleted
+ * @since 8.1.0
*/
public function deleteAllFileKeys($path);
@@ -118,6 +133,7 @@ interface IStorage {
* @param string $keyId id of the key
*
* @return boolean False when the key could not be deleted
+ * @since 8.1.0
*/
public function deleteSystemUserKey($keyId);
@@ -126,6 +142,7 @@ interface IStorage {
*
* @param string $source
* @param string $target
+ * @since 8.1.0
*/
public function renameKeys($source, $target);
@@ -134,6 +151,7 @@ interface IStorage {
*
* @param string $source
* @param string $target
+ * @since 8.1.0
*/
public function copyKeys($source, $target);