aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Encryption
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-06 09:44:04 +0200
committerprovokateurin <kate@provokateurin.de>2024-09-09 11:09:37 +0200
commit007be83a968e6aee649ff8de173163cb5ef93a86 (patch)
tree18e03c4a5562989bbd6482e9e6a47f3619b71e30 /lib/private/Encryption
parentfc10fa592626d154a91d77d35c93beabdc7605c1 (diff)
downloadnextcloud-server-fix/oc/inheritdoc.tar.gz
nextcloud-server-fix/oc/inheritdoc.zip
fix(OC): Remove doc blocks for OCP implementationsfix/oc/inheritdoc
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib/private/Encryption')
-rw-r--r--lib/private/Encryption/File.php6
-rw-r--r--lib/private/Encryption/Keys/Storage.php53
-rw-r--r--lib/private/Encryption/Manager.php41
3 files changed, 0 insertions, 100 deletions
diff --git a/lib/private/Encryption/File.php b/lib/private/Encryption/File.php
index 26e643d1006..e6773ac6787 100644
--- a/lib/private/Encryption/File.php
+++ b/lib/private/Encryption/File.php
@@ -44,12 +44,6 @@ class File implements \OCP\Encryption\IFile {
return $this->appManager;
}
- /**
- * Get list of users with access to the file
- *
- * @param string $path to the file
- * @return array{users: string[], public: bool}
- */
public function getAccessList($path) {
// Make sure that a share key is generated for the owner too
[$owner, $ownerPath] = $this->util->getUidAndFilename($path);
diff --git a/lib/private/Encryption/Keys/Storage.php b/lib/private/Encryption/Keys/Storage.php
index 532d1a51dd6..f0bb2f74656 100644
--- a/lib/private/Encryption/Keys/Storage.php
+++ b/lib/private/Encryption/Keys/Storage.php
@@ -64,17 +64,11 @@ class Storage implements IStorage {
$this->config = $config;
}
- /**
- * @inheritdoc
- */
public function getUserKey($uid, $keyId, $encryptionModuleId) {
$path = $this->constructUserKeyPath($encryptionModuleId, $keyId, $uid);
return base64_decode($this->getKeyWithUid($path, $uid));
}
- /**
- * @inheritdoc
- */
public function getFileKey($path, $keyId, $encryptionModuleId) {
$realFile = $this->util->stripPartialFileExtension($path);
$keyDir = $this->util->getFileKeyDir($encryptionModuleId, $realFile);
@@ -91,17 +85,11 @@ class Storage implements IStorage {
return base64_decode($key);
}
- /**
- * @inheritdoc
- */
public function getSystemUserKey($keyId, $encryptionModuleId) {
$path = $this->constructUserKeyPath($encryptionModuleId, $keyId, null);
return base64_decode($this->getKeyWithUid($path, null));
}
- /**
- * @inheritdoc
- */
public function setUserKey($uid, $keyId, $key, $encryptionModuleId) {
$path = $this->constructUserKeyPath($encryptionModuleId, $keyId, $uid);
return $this->setKey($path, [
@@ -110,9 +98,6 @@ class Storage implements IStorage {
]);
}
- /**
- * @inheritdoc
- */
public function setFileKey($path, $keyId, $key, $encryptionModuleId) {
$keyDir = $this->util->getFileKeyDir($encryptionModuleId, $path);
return $this->setKey($keyDir . $keyId, [
@@ -120,9 +105,6 @@ class Storage implements IStorage {
]);
}
- /**
- * @inheritdoc
- */
public function setSystemUserKey($keyId, $key, $encryptionModuleId) {
$path = $this->constructUserKeyPath($encryptionModuleId, $keyId, null);
return $this->setKey($path, [
@@ -131,9 +113,6 @@ class Storage implements IStorage {
]);
}
- /**
- * @inheritdoc
- */
public function deleteUserKey($uid, $keyId, $encryptionModuleId) {
try {
$path = $this->constructUserKeyPath($encryptionModuleId, $keyId, $uid);
@@ -152,25 +131,16 @@ class Storage implements IStorage {
}
}
- /**
- * @inheritdoc
- */
public function deleteFileKey($path, $keyId, $encryptionModuleId) {
$keyDir = $this->util->getFileKeyDir($encryptionModuleId, $path);
return !$this->view->file_exists($keyDir . $keyId) || $this->view->unlink($keyDir . $keyId);
}
- /**
- * @inheritdoc
- */
public function deleteAllFileKeys($path) {
$keyDir = $this->util->getFileKeyDir('', $path);
return !$this->view->file_exists($keyDir) || $this->view->deleteAll($keyDir);
}
- /**
- * @inheritdoc
- */
public function deleteSystemUserKey($keyId, $encryptionModuleId) {
$path = $this->constructUserKeyPath($encryptionModuleId, $keyId, null);
return !$this->view->file_exists($path) || $this->view->unlink($path);
@@ -334,13 +304,6 @@ class Storage implements IStorage {
return false;
}
- /**
- * move keys if a file was renamed
- *
- * @param string $source
- * @param string $target
- * @return boolean
- */
public function renameKeys($source, $target) {
$sourcePath = $this->getPathToKeys($source);
$targetPath = $this->getPathToKeys($target);
@@ -356,13 +319,6 @@ class Storage implements IStorage {
}
- /**
- * copy keys if a file was renamed
- *
- * @param string $source
- * @param string $target
- * @return boolean
- */
public function copyKeys($source, $target) {
$sourcePath = $this->getPathToKeys($source);
$targetPath = $this->getPathToKeys($target);
@@ -376,15 +332,6 @@ class Storage implements IStorage {
return false;
}
- /**
- * backup keys of a given encryption module
- *
- * @param string $encryptionModuleId
- * @param string $purpose
- * @param string $uid
- * @return bool
- * @since 12.0.0
- */
public function backupUserKeys($encryptionModuleId, $purpose, $uid) {
$source = $uid . $this->encryption_base_dir . '/' . $encryptionModuleId;
$backupDir = $uid . $this->backup_base_dir;
diff --git a/lib/private/Encryption/Manager.php b/lib/private/Encryption/Manager.php
index a07c778bfe0..daeeb879387 100644
--- a/lib/private/Encryption/Manager.php
+++ b/lib/private/Encryption/Manager.php
@@ -34,11 +34,6 @@ class Manager implements IManager {
$this->encryptionModules = [];
}
- /**
- * Check if encryption is enabled
- *
- * @return bool true if enabled, false if not
- */
public function isEnabled() {
$installed = $this->config->getSystemValueBool('installed', false);
if (!$installed) {
@@ -82,14 +77,6 @@ class Manager implements IManager {
return true;
}
- /**
- * Registers an callback function which must return an encryption module instance
- *
- * @param string $id
- * @param string $displayName
- * @param callable $callback
- * @throws Exceptions\ModuleAlreadyExistsException
- */
public function registerEncryptionModule($id, $displayName, callable $callback) {
if (isset($this->encryptionModules[$id])) {
throw new Exceptions\ModuleAlreadyExistsException($id, $displayName);
@@ -108,31 +95,14 @@ class Manager implements IManager {
}
}
- /**
- * Unregisters an encryption module
- *
- * @param string $moduleId
- */
public function unregisterEncryptionModule($moduleId) {
unset($this->encryptionModules[$moduleId]);
}
- /**
- * get a list of all encryption modules
- *
- * @return array [id => ['id' => $id, 'displayName' => $displayName, 'callback' => callback]]
- */
public function getEncryptionModules() {
return $this->encryptionModules;
}
- /**
- * get a specific encryption module
- *
- * @param string $moduleId
- * @return IEncryptionModule
- * @throws Exceptions\ModuleDoesNotExistsException
- */
public function getEncryptionModule($moduleId = '') {
if (empty($moduleId)) {
return $this->getDefaultEncryptionModule();
@@ -164,12 +134,6 @@ class Manager implements IManager {
throw new Exceptions\ModuleDoesNotExistsException($message);
}
- /**
- * set default encryption module Id
- *
- * @param string $moduleId
- * @return bool
- */
public function setDefaultEncryptionModule($moduleId) {
try {
$this->getEncryptionModule($moduleId);
@@ -181,11 +145,6 @@ class Manager implements IManager {
return true;
}
- /**
- * get default encryption module Id
- *
- * @return string
- */
public function getDefaultEncryptionModuleId() {
return $this->config->getAppValue('core', 'default_encryption_module');
}