Completed
Push — master ( 382c63...5355c1 )
by rugk
02:29
created
source/Threema/MsgApi/Tools/CryptTool.php 1 patch
Doc Comments   +15 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,6 +142,11 @@  discard block
 block discarded – undo
142 142
 		return $this->makeBox($message, $nonce, $senderPrivateKey, $recipientPublicKey);
143 143
 	}
144 144
 
145
+	/**
146
+	 * @param string $senderPrivateKey
147
+	 * @param string $recipientPublicKey
148
+	 * @param string $nonce
149
+	 */
145 150
 	final public function encryptFileMessage(UploadFileResult $uploadFileResult,
146 151
 											 EncryptResult $encryptResult,
147 152
 											 UploadFileResult $thumbnailUploadFileResult = null,
@@ -190,9 +195,9 @@  discard block
 block discarded – undo
190 195
 	 * make a secret box
191 196
 	 *
192 197
 	 * @param $data
193
-	 * @param $nonce
198
+	 * @param string $nonce
194 199
 	 * @param $key
195
-	 * @return mixed
200
+	 * @return string
196 201
 	 */
197 202
 	abstract protected function makeSecretBox($data, $nonce, $key);
198 203
 
@@ -334,6 +339,9 @@  discard block
 block discarded – undo
334 339
 		return hash_hmac('sha256', $phoneNoClean, self::PHONENO_HMAC_KEY);
335 340
 	}
336 341
 
342
+	/**
343
+	 * @return string
344
+	 */
337 345
 	abstract protected function createRandom($size);
338 346
 
339 347
 	/**
@@ -376,7 +384,7 @@  discard block
 block discarded – undo
376 384
 	abstract public function validate();
377 385
 
378 386
 	/**
379
-	 * @param $data
387
+	 * @param string $data
380 388
 	 * @return EncryptResult
381 389
 	 */
382 390
 	public final function encryptFile($data) {
@@ -405,6 +413,10 @@  discard block
 block discarded – undo
405 413
 		return new EncryptResult($box, $key,  self::FILE_THUMBNAIL_NONCE, strlen($box));
406 414
 	}
407 415
 
416
+	/**
417
+	 * @param string $data
418
+	 * @param string $key
419
+	 */
408 420
 	public final function decryptFileThumbnail($data, $key) {
409 421
 		$result = $this->openSecretBox($data, self::FILE_THUMBNAIL_NONCE, $key);
410 422
 		return false === $result ? null : $result;
Please login to merge, or discard this patch.
vendor/composer/ClassLoader.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -341,6 +341,10 @@
 block discarded – undo
341 341
         return $file;
342 342
     }
343 343
 
344
+    /**
345
+     * @param string $class
346
+     * @param string $ext
347
+     */
344 348
     private function findFileWithExtension($class, $ext)
345 349
     {
346 350
         // PSR-4 lookup
Please login to merge, or discard this patch.