@@ -238,6 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | /** |
240 | 240 | * Borrowed from SimpleSAMLPHP http://simplesamlphp.org/ |
241 | + * @param integer $length |
|
241 | 242 | */ |
242 | 243 | public static function generateRandomBytes($length, $fallback = TRUE) { |
243 | 244 | static $fp = NULL; |
@@ -278,6 +279,8 @@ discard block |
||
278 | 279 | |
279 | 280 | /** |
280 | 281 | * Constant time string comparison, see http://codahale.com/a-lesson-in-timing-attacks/ |
282 | + * @param string $s1 |
|
283 | + * @param string $s2 |
|
281 | 284 | */ |
282 | 285 | public static function constEqual($s1, $s2) { |
283 | 286 | if (strlen($s1) != strlen($s2)) { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | * @param string $method The HTTP Method (GET, POST, PUT, DELETE) |
46 | 46 | * @param array $data Data send with request as key => value pairs |
47 | 47 | * |
48 | - * @return Object |
|
48 | + * @return Tiqr_API_Entity_APIResult |
|
49 | 49 | * |
50 | 50 | * @throws Exception |
51 | 51 | */ |
@@ -48,11 +48,10 @@ |
||
48 | 48 | /** |
49 | 49 | * Send a message to a device using the firebase API key. |
50 | 50 | * |
51 | - * @param $deviceToken string device ID |
|
52 | - * @param $alert string alert message |
|
51 | + * @param string $deviceToken string device ID |
|
52 | + * @param string $alert string alert message |
|
53 | 53 | * @param $challenge string tiqr challenge url |
54 | 54 | * @param $apiKey string api key for firebase |
55 | - * @param Tiqr_Message_Exception $gcmException |
|
56 | 55 | * |
57 | 56 | * @throws Tiqr_Message_Exception_SendFailure |
58 | 57 | */ |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * Calculate a HOTP response |
32 | 32 | * @param String $secret |
33 | 33 | * @param String $counter |
34 | - * @return String The response |
|
34 | + * @return integer The response |
|
35 | 35 | */ |
36 | 36 | public function calculateResponse($secret, $counter) |
37 | 37 | { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * Truncate a response to a certain length. |
73 | 73 | * @param String $hash |
74 | 74 | * @param int $length |
75 | - * @return String a truncated response |
|
75 | + * @return integer a truncated response |
|
76 | 76 | */ |
77 | 77 | protected function _truncate($hash, $length = 6) |
78 | 78 | { |
@@ -32,6 +32,9 @@ discard block |
||
32 | 32 | * @param String crypto the crypto algorithm (sha1, sha256 or sha512) |
33 | 33 | * @param String keyBytes the bytes to use for the HMAC key |
34 | 34 | * @param String text the message or text to be authenticated. |
35 | + * @param string $crypto |
|
36 | + * @param string $keyBytes |
|
37 | + * @param string $text |
|
35 | 38 | */ |
36 | 39 | private static function _hmac_sha1($crypto, |
37 | 40 | $keyBytes, |
@@ -58,19 +61,22 @@ discard block |
||
58 | 61 | * set of parameters. |
59 | 62 | * |
60 | 63 | * @param ocraSuite the OCRA Suite |
61 | - * @param key the shared secret, HEX encoded |
|
62 | - * @param counter the counter that changes |
|
64 | + * @param key string shared secret, HEX encoded |
|
65 | + * @param counter string counter that changes |
|
63 | 66 | * on a per use basis, |
64 | 67 | * HEX encoded |
65 | - * @param question the challenge question, HEX encoded |
|
68 | + * @param question string challenge question, HEX encoded |
|
66 | 69 | * @param password a password that can be used, |
67 | 70 | * HEX encoded |
68 | 71 | * @param sessionInformation |
69 | 72 | * Static information that identifies the |
70 | 73 | * current session, Hex encoded |
71 | 74 | * @param timeStamp a value that reflects a time |
75 | + * @param string $password |
|
76 | + * @param string $sessionInformation |
|
77 | + * @param string $timeStamp |
|
72 | 78 | * |
73 | - * @return A numeric String in base 10 that includes |
|
79 | + * @return string numeric String in base 10 that includes |
|
74 | 80 | * {@link truncationDigits} digits |
75 | 81 | */ |
76 | 82 | static function generateOCRA($ocraSuite, |
@@ -251,6 +257,7 @@ discard block |
||
251 | 257 | |
252 | 258 | /** |
253 | 259 | * Truncate a result to a certain length |
260 | + * @param string $hash |
|
254 | 261 | */ |
255 | 262 | static function _oath_truncate($hash, $length = 6) |
256 | 263 | { |
@@ -41,6 +41,9 @@ discard block |
||
41 | 41 | * @param String crypto the crypto algorithm (sha1, sha256 or sha512) |
42 | 42 | * @param String keyBytes the bytes to use for the HMAC key |
43 | 43 | * @param String text the message or text to be authenticated. |
44 | + * @param string $crypto |
|
45 | + * @param string $keyBytes |
|
46 | + * @param string $text |
|
44 | 47 | */ |
45 | 48 | private static function _hmac_sha1($crypto, |
46 | 49 | $keyBytes, |
@@ -66,20 +69,23 @@ discard block |
||
66 | 69 | * This method generates an OCRA HOTP value for the given |
67 | 70 | * set of parameters. |
68 | 71 | * |
69 | - * @param ocraSuite the OCRA Suite |
|
70 | - * @param key the shared secret, HEX encoded |
|
71 | - * @param counter the counter that changes |
|
72 | + * @param ocraSuite string OCRA Suite |
|
73 | + * @param key string shared secret, HEX encoded |
|
74 | + * @param counter string counter that changes |
|
72 | 75 | * on a per use basis, |
73 | 76 | * HEX encoded |
74 | - * @param question the challenge question, HEX encoded |
|
77 | + * @param question string challenge question, HEX encoded |
|
75 | 78 | * @param password a password that can be used, |
76 | 79 | * HEX encoded |
77 | 80 | * @param sessionInformation |
78 | 81 | * Static information that identifies the |
79 | 82 | * current session, Hex encoded |
80 | 83 | * @param timeStamp a value that reflects a time |
84 | + * @param string $password |
|
85 | + * @param string $sessionInformation |
|
86 | + * @param string $timeStamp |
|
81 | 87 | * |
82 | - * @return A numeric String in base 10 that includes |
|
88 | + * @return integer numeric String in base 10 that includes |
|
83 | 89 | * {@link truncationDigits} digits |
84 | 90 | */ |
85 | 91 | static function generateOCRA($ocraSuite, |
@@ -223,6 +229,7 @@ discard block |
||
223 | 229 | |
224 | 230 | /** |
225 | 231 | * Truncate a result to a certain length |
232 | + * @param string $hash |
|
226 | 233 | */ |
227 | 234 | function _oath_truncate($hash, $length = 6) |
228 | 235 | { |
@@ -72,7 +72,7 @@ |
||
72 | 72 | * @param String $secret a hex representation of the user's secret |
73 | 73 | * @param String $challenge a hex or (alfa)numeric challenge question |
74 | 74 | * @param String $sessionKey a hex sessionKey identifying the current session |
75 | - * @return String An OCRA response, the length of which is determined by the |
|
75 | + * @return integer An OCRA response, the length of which is determined by the |
|
76 | 76 | * OCRA suite. |
77 | 77 | */ |
78 | 78 | public function calculateResponse($secret, $challenge, $sessionKey) |
@@ -334,10 +334,6 @@ discard block |
||
334 | 334 | * application, for example to create a link in a mobile website on the |
335 | 335 | * same device as where the application is installed |
336 | 336 | * @param String $sessionKey The session key identifying this authentication session |
337 | - * @param String $userId The userId of a pre-authenticated user, if in |
|
338 | - * step-up mode. NULL in other scenario's. |
|
339 | - * @param String $sessionId The application's session identifier. |
|
340 | - * (defaults to php session) |
|
341 | 337 | */ |
342 | 338 | public function generateAuthURL($sessionKey) |
343 | 339 | { |
@@ -613,7 +609,7 @@ discard block |
||
613 | 609 | * session. |
614 | 610 | * @param String $response The response to the challenge that the phone |
615 | 611 | * has posted. |
616 | - * @return String The result of the authentication. This is one of the |
|
612 | + * @return integer The result of the authentication. This is one of the |
|
617 | 613 | * AUTH_RESULT_* constants of the Tiqr_Server class. |
618 | 614 | * (do not make assumptions on the values of these |
619 | 615 | * constants.) |
@@ -710,9 +706,6 @@ discard block |
||
710 | 706 | /** |
711 | 707 | * Generate a challenge URL |
712 | 708 | * @param String $sessionKey The key that identifies the session. |
713 | - * @param String $challenge The authentication challenge |
|
714 | - * @param String $userId The userid to embed in the challenge url (only |
|
715 | - * if a user was pre-authenticated) |
|
716 | 709 | * |
717 | 710 | */ |
718 | 711 | protected function _getChallengeUrl($sessionKey) |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @param String $data Data to encrypt. |
42 | 42 | * |
43 | - * @return encrypted data |
|
43 | + * @return string data |
|
44 | 44 | */ |
45 | 45 | public function encrypt($data) |
46 | 46 | { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * |
53 | 53 | * @param String $data Data to decrypt. |
54 | 54 | * |
55 | - * @return decrypted data |
|
55 | + * @return string data |
|
56 | 56 | */ |
57 | 57 | public function decrypt($data) |
58 | 58 | { |