@@ -49,6 +49,7 @@ discard block |
||
| 49 | 49 | * @param $target_item_guid string The shared item GUID |
| 50 | 50 | * @param $request_array array |
| 51 | 51 | * @param $permissions integer Must be created with a bitmask from options on the ShareRequest class |
| 52 | + * @param string $credential_owner |
|
| 52 | 53 | * @return array Array of sharing requests |
| 53 | 54 | */ |
| 54 | 55 | public function createBulkRequests($target_item_id, $target_item_guid, $request_array, $permissions, $credential_owner) { |
@@ -253,7 +254,6 @@ discard block |
||
| 253 | 254 | /** |
| 254 | 255 | * Delete ACL |
| 255 | 256 | * |
| 256 | - * @param ShareRequest $request |
|
| 257 | 257 | * @return \OCA\Passman\Db\ShareRequest[] |
| 258 | 258 | */ |
| 259 | 259 | public function deleteShareACL(SharingACL $ACL) { |
@@ -277,7 +277,6 @@ discard block |
||
| 277 | 277 | /** |
| 278 | 278 | * Get pending share requests by guid and uid |
| 279 | 279 | * |
| 280 | - * @param ShareRequest $request |
|
| 281 | 280 | * @return \OCA\Passman\Db\ShareRequest[] |
| 282 | 281 | */ |
| 283 | 282 | public function getPendingShareRequestsForCredential($item_guid, $user_id) { |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * Get a app setting |
| 71 | 71 | * |
| 72 | 72 | * @param $key string |
| 73 | - * @param null $default_value The default value if key does not exist |
|
| 73 | + * @param boolean $default_value The default value if key does not exist |
|
| 74 | 74 | * @return mixed |
| 75 | 75 | */ |
| 76 | 76 | public function getAppSetting($key, $default_value = null) { |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | /** |
| 111 | 111 | * Check if an setting is enabled (value of 1) |
| 112 | 112 | * |
| 113 | - * @param $setting |
|
| 113 | + * @param string $setting |
|
| 114 | 114 | * @return bool |
| 115 | 115 | */ |
| 116 | 116 | public function isEnabled($setting) { |
@@ -212,6 +212,10 @@ discard block |
||
| 212 | 212 | return array($cipherKey, $macKey, $iv); |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | + /** |
|
| 216 | + * @param string $a |
|
| 217 | + * @param string $b |
|
| 218 | + */ |
|
| 215 | 219 | protected function hash_equals($a, $b) { |
| 216 | 220 | $key = openssl_random_pseudo_bytes(128); |
| 217 | 221 | return hash_hmac('sha512', $a, $key) === hash_hmac('sha512', $b, $key); |
@@ -249,7 +253,7 @@ discard block |
||
| 249 | 253 | /** |
| 250 | 254 | * Pad the data with a random char chosen by the pad amount. |
| 251 | 255 | * |
| 252 | - * @param $data |
|
| 256 | + * @param string $data |
|
| 253 | 257 | * @return string |
| 254 | 258 | */ |
| 255 | 259 | protected function pad($data) { |
@@ -265,8 +269,8 @@ discard block |
||
| 265 | 269 | /** |
| 266 | 270 | * Unpad the the data |
| 267 | 271 | * |
| 268 | - * @param $data |
|
| 269 | - * @return bool|string |
|
| 272 | + * @param string $data |
|
| 273 | + * @return false|string |
|
| 270 | 274 | */ |
| 271 | 275 | protected function unpad($data) { |
| 272 | 276 | $length = $this->getKeySize(); |
@@ -283,7 +287,7 @@ discard block |
||
| 283 | 287 | * Encrypt a credential |
| 284 | 288 | * |
| 285 | 289 | * @param Credential|array $credential the credential to decrypt |
| 286 | - * @return Credential|array |
|
| 290 | + * @return string |
|
| 287 | 291 | */ |
| 288 | 292 | public function decryptCredential($credential) { |
| 289 | 293 | return $this->handleCredential($credential, 'decrypt'); |
@@ -304,6 +308,7 @@ discard block |
||
| 304 | 308 | * Handles the encryption / decryption of a credential |
| 305 | 309 | * |
| 306 | 310 | * @param Credential|array $credential the credential to encrypt |
| 311 | + * @param string $op |
|
| 307 | 312 | * @return Credential|array |
| 308 | 313 | * @throws \Exception |
| 309 | 314 | */ |
@@ -347,7 +352,7 @@ discard block |
||
| 347 | 352 | /** |
| 348 | 353 | * Decrypt a file |
| 349 | 354 | * |
| 350 | - * @param File|array $file |
|
| 355 | + * @param File $file |
|
| 351 | 356 | * @return File|array |
| 352 | 357 | */ |
| 353 | 358 | |
@@ -358,7 +363,7 @@ discard block |
||
| 358 | 363 | /** |
| 359 | 364 | * Handles the encryption / decryption of a File |
| 360 | 365 | * |
| 361 | - * @param File|array $credential the credential to encrypt |
|
| 366 | + * @param string $op |
|
| 362 | 367 | * @return File|array |
| 363 | 368 | * @throws \Exception |
| 364 | 369 | */ |