@@ -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) { |
@@ -213,6 +213,10 @@ discard block |
||
| 213 | 213 | return array($cipherKey, $macKey, $iv); |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | + /** |
|
| 217 | + * @param string $a |
|
| 218 | + * @param string $b |
|
| 219 | + */ |
|
| 216 | 220 | function hash_equals($a, $b) { |
| 217 | 221 | $key = openssl_random_pseudo_bytes(128); |
| 218 | 222 | return hash_hmac('sha512', $a, $key) === hash_hmac('sha512', $b, $key); |
@@ -250,7 +254,7 @@ discard block |
||
| 250 | 254 | /** |
| 251 | 255 | * Pad the data with a random char chosen by the pad amount. |
| 252 | 256 | * |
| 253 | - * @param $data |
|
| 257 | + * @param string $data |
|
| 254 | 258 | * @return string |
| 255 | 259 | */ |
| 256 | 260 | protected function pad($data) { |
@@ -266,8 +270,8 @@ discard block |
||
| 266 | 270 | /** |
| 267 | 271 | * Unpad the the data |
| 268 | 272 | * |
| 269 | - * @param $data |
|
| 270 | - * @return bool|string |
|
| 273 | + * @param string $data |
|
| 274 | + * @return false|string |
|
| 271 | 275 | */ |
| 272 | 276 | protected function unpad($data) { |
| 273 | 277 | $length = $this->getKeySize(); |
@@ -284,7 +288,7 @@ discard block |
||
| 284 | 288 | * Encrypt a credential |
| 285 | 289 | * |
| 286 | 290 | * @param array|Credential $credential the credential to decrypt |
| 287 | - * @return Credential|array |
|
| 291 | + * @return string |
|
| 288 | 292 | */ |
| 289 | 293 | public function decryptCredential($credential) { |
| 290 | 294 | |
@@ -380,7 +384,7 @@ discard block |
||
| 380 | 384 | /** |
| 381 | 385 | * Decrypt a file |
| 382 | 386 | * |
| 383 | - * @param File|array $file |
|
| 387 | + * @param File $file |
|
| 384 | 388 | * @return File|array |
| 385 | 389 | */ |
| 386 | 390 | |
@@ -110,7 +110,7 @@ |
||
| 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) { |