@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | * Sets up the object |
99 | 99 | * @param string $id The client identity |
100 | 100 | * @param string $key The client MAC key (optional) |
101 | - * @param boolean $https Flag whether to use https (optional) |
|
102 | - * @param boolean $httpsverify Flag whether to use verify HTTPS |
|
101 | + * @param integer $https Flag whether to use https (optional) |
|
102 | + * @param integer $httpsverify Flag whether to use verify HTTPS |
|
103 | 103 | * server certificates (optional, |
104 | 104 | * default true) |
105 | 105 | * @access public |
@@ -207,6 +207,7 @@ discard block |
||
207 | 207 | * |
208 | 208 | * @param string Input string to parse |
209 | 209 | * @param string Optional delimiter re-class, default is '[:]' |
210 | + * @param string $str |
|
210 | 211 | * @return array Keyed array with fields |
211 | 212 | * @access public |
212 | 213 | */ |
@@ -294,6 +294,9 @@ discard block |
||
294 | 294 | return call_user_func_array(array($this, 'query'), $args); |
295 | 295 | } |
296 | 296 | |
297 | + /** |
|
298 | + * @param string $which |
|
299 | + */ |
|
297 | 300 | public function insertOrReplace($which, $table, $datas, $options=array()) { |
298 | 301 | $datas = unserialize(serialize($datas)); // break references within array |
299 | 302 | $keys = $values = array(); |
@@ -566,6 +569,9 @@ discard block |
||
566 | 569 | return $query; |
567 | 570 | } |
568 | 571 | |
572 | + /** |
|
573 | + * @param string $prepend |
|
574 | + */ |
|
569 | 575 | protected function prependCall($function, $args, $prepend) { array_unshift($args, $prepend); return call_user_func_array($function, $args); } |
570 | 576 | public function query() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'assoc'); } |
571 | 577 | public function queryAllLists() { $args = func_get_args(); return $this->prependCall(array($this, 'queryHelper'), $args, 'list'); } |
@@ -200,7 +200,7 @@ |
||
200 | 200 | * Connect to a POP3 server. |
201 | 201 | * @access public |
202 | 202 | * @param string $host |
203 | - * @param integer|boolean $port |
|
203 | + * @param integer $port |
|
204 | 204 | * @param integer $tval |
205 | 205 | * @return boolean |
206 | 206 | */ |
@@ -49,6 +49,10 @@ discard block |
||
49 | 49 | return $output; |
50 | 50 | } |
51 | 51 | |
52 | + /** |
|
53 | + * @param integer $rnd |
|
54 | + * @param integer $Nb |
|
55 | + */ |
|
52 | 56 | private static function addRoundKey($state, $w, $rnd, $Nb) |
53 | 57 | { |
54 | 58 | // xor Round Key into state S [é5.1.4] |
@@ -61,6 +65,9 @@ discard block |
||
61 | 65 | return $state; |
62 | 66 | } |
63 | 67 | |
68 | + /** |
|
69 | + * @param integer $Nb |
|
70 | + */ |
|
64 | 71 | private static function subBytes($s, $Nb) |
65 | 72 | { |
66 | 73 | // apply SBox to state S [é5.1.1] |
@@ -73,6 +80,9 @@ discard block |
||
73 | 80 | return $s; |
74 | 81 | } |
75 | 82 | |
83 | + /** |
|
84 | + * @param integer $Nb |
|
85 | + */ |
|
76 | 86 | private static function shiftRows($s, $Nb) |
77 | 87 | { |
78 | 88 | // shift row r of state S left by r bytes [é5.1.2] |
@@ -88,6 +98,9 @@ discard block |
||
88 | 98 | return $s; // see fp.gladman.plus.com/cryptography_technology/rijndael/aes.spec.311.pdf |
89 | 99 | } |
90 | 100 | |
101 | + /** |
|
102 | + * @param integer $Nb |
|
103 | + */ |
|
91 | 104 | private static function mixColumns($s, $Nb) |
92 | 105 | { |
93 | 106 | // combine bytes of each col of state S [é5.1.3] |
@@ -219,10 +232,10 @@ discard block |
||
219 | 232 | * |
220 | 233 | * Unicode multi-byte character safe |
221 | 234 | * |
222 | - * @param plaintext source text to be encrypted |
|
235 | + * @param plaintext string text to be encrypted |
|
223 | 236 | * @param password the password to use to generate a key |
224 | - * @param nBits number of bits to be used in the key (128, 192, or 256) |
|
225 | - * @return encrypted text |
|
237 | + * @param nBits integer of bits to be used in the key (128, 192, or 256) |
|
238 | + * @return string text |
|
226 | 239 | */ |
227 | 240 | public static function encrypt($plaintext, $password, $nBits) |
228 | 241 | { |
@@ -302,8 +315,8 @@ discard block |
||
302 | 315 | * |
303 | 316 | * @param ciphertext source text to be decrypted |
304 | 317 | * @param password the password to use to generate a key |
305 | - * @param nBits number of bits to be used in the key (128, 192, or 256) |
|
306 | - * @return decrypted text |
|
318 | + * @param nBits integer of bits to be used in the key (128, 192, or 256) |
|
319 | + * @return string text |
|
307 | 320 | */ |
308 | 321 | public static function decrypt($ciphertext, $password, $nBits) |
309 | 322 | { |
@@ -706,7 +706,7 @@ |
||
706 | 706 | * |
707 | 707 | * @throws Ex\IOException |
708 | 708 | * |
709 | - * @return string |
|
709 | + * @return integer |
|
710 | 710 | */ |
711 | 711 | public static function writeBytes($stream, $buf, $num_bytes = null) |
712 | 712 | { |
@@ -74,6 +74,9 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | // Compares two strings $a and $b in length-constant time. |
77 | +/** |
|
78 | + * @param string $a |
|
79 | + */ |
|
77 | 80 | function slow_equals($a, $b) |
78 | 81 | { |
79 | 82 | $diff = strlen($a) ^ strlen($b); |
@@ -99,6 +102,9 @@ discard block |
||
99 | 102 | * This implementation of PBKDF2 was originally created by https://defuse.ca |
100 | 103 | * With improvements by http://www.variations-of-shadow.com |
101 | 104 | */ |
105 | +/** |
|
106 | + * @param integer $key_length |
|
107 | + */ |
|
102 | 108 | function pbkdf2($algorithm, $password, $salt, $count, $key_length, $raw_output = false) |
103 | 109 | { |
104 | 110 | $algorithm = strtolower($algorithm); |
@@ -76,6 +76,10 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | // Compares two strings $a and $b in length-constant time. |
79 | + |
|
80 | + /** |
|
81 | + * @param string $a |
|
82 | + */ |
|
79 | 83 | public static function slow_equals($a, $b) |
80 | 84 | { |
81 | 85 | $diff = strlen($a) ^ strlen($b); |
@@ -101,6 +105,11 @@ discard block |
||
101 | 105 | * This implementation of PBKDF2 was originally created by https://defuse.ca |
102 | 106 | * With improvements by http://www.variations-of-shadow.com |
103 | 107 | */ |
108 | + |
|
109 | + /** |
|
110 | + * @param integer $count |
|
111 | + * @param integer $key_length |
|
112 | + */ |
|
104 | 113 | private static function pbkdf2($algorithm, $password, $salt, $count, $key_length, $raw_output = false) |
105 | 114 | { |
106 | 115 | $algorithm = strtolower($algorithm); |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | /** |
758 | 758 | * Returns objectClass in an array |
759 | 759 | * |
760 | - * @param string $distinguisedName The full DN of a contact |
|
760 | + * @param string $distinguishedName The full DN of a contact |
|
761 | 761 | * @return array |
762 | 762 | */ |
763 | 763 | public function getObjectClass($distinguishedName) { |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | /** |
791 | 791 | * Get the RootDSE properties from a domain controller |
792 | 792 | * |
793 | - * @param array $attributes The attributes you wish to query e.g. defaultnamingcontext |
|
793 | + * @param string[] $attributes The attributes you wish to query e.g. defaultnamingcontext |
|
794 | 794 | * @return array |
795 | 795 | */ |
796 | 796 | public function getRootDse($attributes = array("*", "+")) { |
@@ -101,7 +101,7 @@ |
||
101 | 101 | * @param string $computerName The name of the computer |
102 | 102 | * @param string $group The group to check |
103 | 103 | * @param bool $recursive Whether to check recursively |
104 | - * @return array |
|
104 | + * @return boolean |
|
105 | 105 | */ |
106 | 106 | public function inGroup($computerName, $group, $recursive = NULL) { |
107 | 107 | if ($computerName === NULL) { return false; } |