Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
dc36d309
Commit
dc36d309
authored
May 19, 2014
by
Morris Jobke
Browse files
Remove all occurences of @brief and @returns from PHPDoc
* test case added to avoid adding them later
parent
95741f39
Changes
130
Hide whitespace changes
Inline
Side-by-side
apps/files/tests/ajax_rename.php
View file @
dc36d309
...
...
@@ -66,7 +66,7 @@ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase {
}
/**
*
@brief
test rename of file/folder
* test rename of file/folder
*/
function
testRenameFolder
()
{
$dir
=
'/'
;
...
...
apps/files_encryption/ajax/adminrecovery.php
View file @
dc36d309
...
...
@@ -5,7 +5,7 @@
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*
*
@brief
Script to handle admin settings for encrypted key recovery
* Script to handle admin settings for encrypted key recovery
*/
use
OCA\Encryption
;
...
...
apps/files_encryption/ajax/changeRecoveryPassword.php
View file @
dc36d309
...
...
@@ -5,7 +5,7 @@
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*
*
@brief
Script to change recovery key password
* Script to change recovery key password
*
*/
...
...
apps/files_encryption/ajax/getMigrationStatus.php
View file @
dc36d309
...
...
@@ -4,7 +4,7 @@
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*
*
@brief
check migration status
* check migration status
*/
use
OCA\Encryption\Util
;
...
...
apps/files_encryption/ajax/updatePrivateKeyPassword.php
View file @
dc36d309
...
...
@@ -5,7 +5,7 @@
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*
*
@brief
Script to change recovery key password
* Script to change recovery key password
*
*/
...
...
apps/files_encryption/ajax/userrecovery.php
View file @
dc36d309
...
...
@@ -4,7 +4,7 @@
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*
*
@brief
Script to handle admin settings for encrypted key recovery
* Script to handle admin settings for encrypted key recovery
*/
use
OCA\Encryption
;
...
...
apps/files_encryption/hooks/hooks.php
View file @
dc36d309
...
...
@@ -36,7 +36,7 @@ class Hooks {
private
static
$deleteFiles
=
array
();
/**
*
@brief
Startup encryption backend upon user login
* Startup encryption backend upon user login
* @note This method should never be called for users using client side encryption
*/
public
static
function
login
(
$params
)
{
...
...
@@ -136,7 +136,7 @@ class Hooks {
}
/**
*
@brief
setup encryption backend upon user created
* setup encryption backend upon user created
* @note This method should never be called for users using client side encryption
*/
public
static
function
postCreateUser
(
$params
)
{
...
...
@@ -149,7 +149,7 @@ class Hooks {
}
/**
*
@brief
cleanup encryption backend upon user deleted
* cleanup encryption backend upon user deleted
* @note This method should never be called for users using client side encryption
*/
public
static
function
postDeleteUser
(
$params
)
{
...
...
@@ -171,7 +171,7 @@ class Hooks {
}
/**
*
@brief
If the password can't be changed within ownCloud, than update the key password in advance.
* If the password can't be changed within ownCloud, than update the key password in advance.
*/
public
static
function
preSetPassphrase
(
$params
)
{
if
(
\
OCP\App
::
isEnabled
(
'files_encryption'
))
{
...
...
@@ -182,7 +182,7 @@ class Hooks {
}
/**
*
@brief
Change a user's encryption passphrase
* Change a user's encryption passphrase
* @param array $params keys: uid, password
*/
public
static
function
setPassphrase
(
$params
)
{
...
...
@@ -259,7 +259,7 @@ class Hooks {
}
/*
*
@brief
check if files can be encrypted to every user.
* check if files can be encrypted to every user.
*/
/**
* @param array $params
...
...
@@ -398,7 +398,7 @@ class Hooks {
}
/**
*
@brief
mark file as renamed so that we know the original source after the file was renamed
* mark file as renamed so that we know the original source after the file was renamed
* @param array $params with the old path and the new path
*/
public
static
function
preRename
(
$params
)
{
...
...
@@ -421,7 +421,7 @@ class Hooks {
}
/**
*
@brief
after a file is renamed, rename its keyfile and share-keys also fix the file size and fix also the sharing
* after a file is renamed, rename its keyfile and share-keys also fix the file size and fix also the sharing
* @param array $params array with oldpath and newpath
*
* This function is connected to the rename signal of OC_Filesystem and adjust the name and location
...
...
@@ -557,7 +557,7 @@ class Hooks {
}
/**
*
@brief
if the file was really deleted we remove the encryption keys
* if the file was really deleted we remove the encryption keys
* @param array $params
* @return boolean|null
*/
...
...
@@ -597,7 +597,7 @@ class Hooks {
}
/**
*
@brief
remember the file which should be deleted and it's owner
* remember the file which should be deleted and it's owner
* @param array $params
* @return boolean|null
*/
...
...
apps/files_encryption/lib/crypt.php
View file @
dc36d309
...
...
@@ -40,7 +40,7 @@ class Crypt {
/**
*
@brief
return encryption mode client or server side encryption
* return encryption mode client or server side encryption
* @param string $user name (use system wide setting if name=null)
* @return string 'client' or 'server'
*/
...
...
@@ -51,7 +51,7 @@ class Crypt {
}
/**
*
@brief
Create a new encryption keypair
* Create a new encryption keypair
* @return array publicKey, privatekey
*/
public
static
function
createKeypair
()
{
...
...
@@ -85,7 +85,7 @@ class Crypt {
}
/**
*
@brief
Add arbitrary padding to encrypted data
* Add arbitrary padding to encrypted data
* @param string $data data to be padded
* @return string padded data
* @note In order to end up with data exactly 8192 bytes long we must
...
...
@@ -102,7 +102,7 @@ class Crypt {
}
/**
*
@brief
Remove arbitrary padding to encrypted data
* Remove arbitrary padding to encrypted data
* @param string $padded padded data to remove padding from
* @return string unpadded data on success, false on error
*/
...
...
@@ -124,7 +124,7 @@ class Crypt {
}
/**
*
@brief
Check if a file's contents contains an IV and is symmetrically encrypted
* Check if a file's contents contains an IV and is symmetrically encrypted
* @param string $content
* @return boolean
* @note see also OCA\Encryption\Util->isEncryptedPath()
...
...
@@ -178,7 +178,7 @@ class Crypt {
}
/**
*
@brief
Check if a file is encrypted via legacy system
* Check if a file is encrypted via legacy system
* @param boolean $isCatFileContent
* @param string $relPath The path of the file, relative to user/data;
* e.g. filename or /Docs/filename, NOT admin/files/filename
...
...
@@ -208,7 +208,7 @@ class Crypt {
}
/**
*
@brief
Symmetrically encrypt a string
* Symmetrically encrypt a string
* @param string $plainContent
* @param string $iv
* @param string $passphrase
...
...
@@ -228,7 +228,7 @@ class Crypt {
}
/**
*
@brief
Symmetrically decrypt a string
* Symmetrically decrypt a string
* @param string $encryptedContent
* @param string $iv
* @param string $passphrase
...
...
@@ -250,7 +250,7 @@ class Crypt {
}
/**
*
@brief
Concatenate encrypted data with its IV and padding
* Concatenate encrypted data with its IV and padding
* @param string $content content to be concatenated
* @param string $iv IV to be concatenated
* @return string concatenated content
...
...
@@ -264,7 +264,7 @@ class Crypt {
}
/**
*
@brief
Split concatenated data and IV into respective parts
* Split concatenated data and IV into respective parts
* @param string $catFile concatenated data to be split
* @return array keys: encrypted, iv
*/
...
...
@@ -289,7 +289,7 @@ class Crypt {
}
/**
*
@brief
Symmetrically encrypts a string and returns keyfile content
* Symmetrically encrypts a string and returns keyfile content
* @param string $plainContent content to be encrypted in keyfile
* @param string $passphrase
* @return false|string encrypted content combined with IV
...
...
@@ -321,7 +321,7 @@ class Crypt {
/**
*
@brief
Symmetrically decrypts keyfile content
* Symmetrically decrypts keyfile content
* @param string $keyfileContent
* @param string $passphrase
* @throws \Exception
...
...
@@ -358,7 +358,7 @@ class Crypt {
}
/**
*
@brief
Decrypt private key and check if the result is a valid keyfile
* Decrypt private key and check if the result is a valid keyfile
* @param string $encryptedKey encrypted keyfile
* @param string $passphrase to decrypt keyfile
* @return string|false encrypted private key or false
...
...
@@ -385,7 +385,7 @@ class Crypt {
}
/**
*
@brief
Create asymmetrically encrypted keyfile content using a generated key
* Create asymmetrically encrypted keyfile content using a generated key
* @param string $plainContent content to be encrypted
* @param array $publicKeys array keys must be the userId of corresponding user
* @return array keys: keys (array, key = userId), data
...
...
@@ -433,7 +433,7 @@ class Crypt {
}
/**
*
@brief
Asymmetrically encrypt a file using multiple public keys
* Asymmetrically encrypt a file using multiple public keys
* @param string $encryptedContent
* @param string $shareKey
* @param mixed $privateKey
...
...
@@ -467,7 +467,7 @@ class Crypt {
}
/**
*
@brief
Generates a pseudo random initialisation vector
* Generates a pseudo random initialisation vector
* @return String $iv generated IV
*/
private
static
function
generateIv
()
{
...
...
@@ -496,7 +496,7 @@ class Crypt {
}
/**
*
@brief
Generate a pseudo random 256-bit ASCII key, used as file key
* Generate a pseudo random 256-bit ASCII key, used as file key
* @return string|false Generated key
*/
public
static
function
generateKey
()
{
...
...
@@ -522,7 +522,7 @@ class Crypt {
}
/**
*
@brief
Get the blowfish encryption handler for a key
* Get the blowfish encryption handler for a key
* @param string $key (optional)
* @return \Crypt_Blowfish blowfish object
*
...
...
@@ -543,7 +543,7 @@ class Crypt {
}
/**
*
@brief
decrypts content using legacy blowfish system
* decrypts content using legacy blowfish system
* @param string $content the cleartext message you want to decrypt
* @param string $passphrase
* @return string cleartext content
...
...
apps/files_encryption/lib/helper.php
View file @
dc36d309
...
...
@@ -24,7 +24,7 @@
namespace
OCA\Encryption
;
/**
*
@brief
Class to manage registration of hooks an various helper methods
* Class to manage registration of hooks an various helper methods
* @package OCA\Encryption
*/
class
Helper
{
...
...
@@ -32,7 +32,7 @@ class Helper {
private
static
$tmpFileMapping
;
// Map tmp files to files in data/user/files
/**
*
@brief
register share related hooks
* register share related hooks
*
*/
public
static
function
registerShareHooks
()
{
...
...
@@ -43,7 +43,7 @@ class Helper {
}
/**
*
@brief
register user related hooks
* register user related hooks
*
*/
public
static
function
registerUserHooks
()
{
...
...
@@ -56,7 +56,7 @@ class Helper {
}
/**
*
@brief
register filesystem related hooks
* register filesystem related hooks
*
*/
public
static
function
registerFilesystemHooks
()
{
...
...
@@ -68,7 +68,7 @@ class Helper {
}
/**
*
@brief
register app management related hooks
* register app management related hooks
*
*/
public
static
function
registerAppHooks
()
{
...
...
@@ -78,7 +78,7 @@ class Helper {
}
/**
*
@brief
setup user for files_encryption
* setup user for files_encryption
*
* @param Util $util
* @param string $password
...
...
@@ -100,7 +100,7 @@ class Helper {
}
/**
*
@brief
enable recovery
* enable recovery
*
* @param string $recoveryKeyId
* @param string $recoveryPassword
...
...
@@ -164,7 +164,7 @@ class Helper {
}
/**
*
@brief
Check if a path is a .part file
* Check if a path is a .part file
* @param string $path Path that may identify a .part file
* @return bool
*/
...
...
@@ -181,7 +181,7 @@ class Helper {
/**
*
@brief
Remove .path extension from a file path
* Remove .path extension from a file path
* @param string $path Path that may identify a .part file
* @return string File path without .part extension
* @note this is needed for reusing keys
...
...
@@ -208,7 +208,7 @@ class Helper {
}
/**
*
@brief
disable recovery
* disable recovery
*
* @param string $recoveryPassword
* @return bool
...
...
@@ -227,7 +227,7 @@ class Helper {
/**
*
@brief
checks if access is public/anonymous user
* checks if access is public/anonymous user
* @return bool
*/
public
static
function
isPublicAccess
()
{
...
...
@@ -239,7 +239,7 @@ class Helper {
}
/**
*
@brief
Format a path to be relative to the /user/files/ directory
* Format a path to be relative to the /user/files/ directory
* @param string $path the absolute path
* @return string e.g. turns '/admin/files/test.txt' into 'test.txt'
*/
...
...
@@ -259,7 +259,7 @@ class Helper {
}
/**
*
@brief
try to get the user from the path if no user is logged in
* try to get the user from the path if no user is logged in
* @param string $path
* @return mixed user or false if we couldn't determine a user
*/
...
...
@@ -294,7 +294,7 @@ class Helper {
}
/**
*
@brief
get path to the corresponding file in data/user/files if path points
* get path to the corresponding file in data/user/files if path points
* to a version or to a file in cache
* @param string $path path to a version or a file in the trash
* @return string path to corresponding file relative to data/user/files
...
...
@@ -327,7 +327,7 @@ class Helper {
}
/**
*
@brief
create directory recursively
* create directory recursively
* @param string $path
* @param \OC\Files\View $view
*/
...
...
@@ -344,7 +344,7 @@ class Helper {
}
/**
*
@brief
redirect to a error page
* redirect to a error page
* @param Session $session
*/
public
static
function
redirectToErrorPage
(
$session
,
$errorCode
=
null
)
{
...
...
@@ -428,7 +428,7 @@ class Helper {
}
/**
*
@brief
glob uses different pattern than regular expressions, escape glob pattern only
* glob uses different pattern than regular expressions, escape glob pattern only
* @param string $path unescaped path
* @return string path
*/
...
...
@@ -437,7 +437,7 @@ class Helper {
}
/**
*
@brief
remember from which file the tmp file (getLocalFile() call) was created
* remember from which file the tmp file (getLocalFile() call) was created
* @param string $tmpFile path of tmp file
* @param string $originalFile path of the original file relative to data/
*/
...
...
@@ -446,7 +446,7 @@ class Helper {
}
/**
*
@brief
get the path of the original file
* get the path of the original file
* @param string $tmpFile path of the tmp file
* @return string|false path of the original file or false
*/
...
...
apps/files_encryption/lib/keymanager.php
View file @
dc36d309
...
...
@@ -24,13 +24,13 @@
namespace
OCA\Encryption
;
/**
*
@brief
Class to manage storage and retrieval of encryption keys
* Class to manage storage and retrieval of encryption keys
* @note Where a method requires a view object, it's root must be '/'
*/
class
Keymanager
{
/**
*
@brief
retrieve the ENCRYPTED private key from a user
* retrieve the ENCRYPTED private key from a user
*
* @param \OC\Files\View $view
* @param string $user
...
...
@@ -55,7 +55,7 @@ class Keymanager {
}
/**
*
@brief
retrieve public key for a specified user
* retrieve public key for a specified user
* @param \OC\Files\View $view
* @param string $userId
* @return string public key or false
...
...
@@ -74,7 +74,7 @@ class Keymanager {
}
/**
*
@brief
Retrieve a user's public and private key
* Retrieve a user's public and private key
* @param \OC\Files\View $view
* @param string $userId
* @return array keys: privateKey, publicKey
...
...
@@ -89,7 +89,7 @@ class Keymanager {
}
/**
*
@brief
Retrieve public keys for given users
* Retrieve public keys for given users
* @param \OC\Files\View $view
* @param array $userIds
* @return array of public keys for the specified users
...
...
@@ -109,7 +109,7 @@ class Keymanager {
}
/**
*
@brief
store file encryption key
* store file encryption key
*
* @param \OC\Files\View $view
* @param \OCA\Encryption\Util $util
...
...
@@ -167,7 +167,7 @@ class Keymanager {
}
/**
*
@brief
retrieve keyfile for an encrypted file
* retrieve keyfile for an encrypted file
* @param \OC\Files\View $view
* @param \OCA\Encryption\Util $util
* @param string|false $filePath
...
...
@@ -210,7 +210,7 @@ class Keymanager {
}
/**
*
@brief
Delete a keyfile
* Delete a keyfile
*
* @param \OC\Files\View $view
* @param string $path path of the file the key belongs to
...
...
@@ -266,7 +266,7 @@ class Keymanager {
}
/**
*
@brief
store private key from the user
* store private key from the user
* @param string $key
* @return bool
* @note Encryption of the private key must be performed by client code
...
...
@@ -293,7 +293,7 @@ class Keymanager {
}
/**
*
@brief
store share key
* store share key
*
* @param \OC\Files\View $view
* @param string $path where the share key is stored
...
...
@@ -319,7 +319,7 @@ class Keymanager {
}
/**
*
@brief
store multiple share keys for a single file
* store multiple share keys for a single file
* @param \OC\Files\View $view
* @param \OCA\Encryption\Util $util
* @param string $path
...
...
@@ -365,7 +365,7 @@ class Keymanager {
}
/**
*
@brief
retrieve shareKey for an encrypted file
* retrieve shareKey for an encrypted file
* @param \OC\Files\View $view
* @param string $userId
* @param \OCA\Encryption\Util $util
...
...
@@ -406,7 +406,7 @@ class Keymanager {
}
/**
*
@brief
delete all share keys of a given file
* delete all share keys of a given file
* @param \OC\Files\View $view
* @param string $userId owner of the file
* @param string $filePath path to the file, relative to the owners file dir
...
...
@@ -445,7 +445,7 @@ class Keymanager {
}
/**
*
@brief
Delete a single user's shareKey for a single file
* Delete a single user's shareKey for a single file
*/
public
static
function
delShareKey
(
\
OC\Files\View
$view
,
$userIds
,
$filePath
)
{
...
...
@@ -486,7 +486,7 @@ class Keymanager {
}
/**
*
@brief
recursively delete share keys from given users
* recursively delete share keys from given users
*
* @param string $dir directory
* @param array $userIds user ids for which the share keys should be deleted
...
...
@@ -512,7 +512,7 @@ class Keymanager {
}
/**
*
@brief
Make preparations to vars and filesystem for saving a keyfile
* Make preparations to vars and filesystem for saving a keyfile
* @param string|boolean $path
* @param string $basePath
*/
...
...
@@ -542,7 +542,7 @@ class Keymanager {
}
/**
*
@brief
extract filename from share key name
* extract filename from share key name
* @param string $shareKey (filename.userid.sharekey)
* @return string|false filename or false
*/
...
...
apps/files_encryption/lib/proxy.php
View file @
dc36d309
...
...
@@ -24,7 +24,7 @@
*/
/**
*
@brief
Encryption proxy which handles filesystem operations before and after
* Encryption proxy which handles filesystem operations before and after
* execution and encrypts, and handles keyfiles accordingly. Used for
* webui.
*/
...
...
@@ -144,7 +144,7 @@ class Proxy extends \OC_FileProxy {
}
/**
*
@brief
update file cache with the new unencrypted size after file was written
* update file cache with the new unencrypted size after file was written
* @param string $path
* @param mixed $result
* @return mixed
...
...
@@ -212,7 +212,7 @@ class Proxy extends \OC_FileProxy {
}
/**
*
@brief
remember initial fopen mode because sometimes it gets changed during the request
* remember initial fopen mode because sometimes it gets changed during the request
* @param string $path path
* @param string $mode type of access
*/
...
...
apps/files_encryption/lib/session.php
View file @
dc36d309
...
...
@@ -36,7 +36,7 @@ class Session {
/**
*
@brief
if session is started, check if ownCloud key pair is set up, if not create it
* if session is started, check if ownCloud key pair is set up, if not create it
* @param \OC\Files\View $view
*
* @note The ownCloud key pair is used to allow public link sharing even if encryption is enabled
...
...
@@ -105,7 +105,7 @@ class Session {
}
/**
*
@brief
Sets user private key to session
* Sets user private key to session
* @param string $privateKey