@@ -2112,6 +2112,12 @@ public function validateAudience( mixed $audience ): Validator;
21122112Validate the audience
21132113
21142114
2115+ ``` php
2116+ public function validateClaim( string $name, mixed $value ): Validator;
2117+ ```
2118+ Validate a claim
2119+
2120+
21152121``` php
21162122public function validateExpiration( int $timestamp ): Validator;
21172123```
@@ -2236,11 +2242,10 @@ This class partially borrows SecureRandom library from Ruby
22362242### Methods
22372243
22382244``` php
2239- public function base58( int $len = null ): string;
2245+ public function base58( int $len = int ): string;
22402246```
22412247Generates a random base58 string
22422248
2243- If $len is not specified, 16 is assumed. It may be larger in future.
22442249The result may contain alphanumeric characters except 0, O, I and l.
22452250
22462251It is similar to ` Phalcon\Encryption\Security\Random::base64() ` but has been
@@ -2259,12 +2264,10 @@ echo $random->base58(); // 4kUgL2pdQMSCQtjE
22592264
22602265
22612266``` php
2262- public function base62( int $len = null ): string;
2267+ public function base62( int $len = int ): string;
22632268```
22642269Generates a random base62 string
22652270
2266- If $len is not specified, 16 is assumed. It may be larger in future.
2267-
22682271It is similar to ` Phalcon\Encryption\Security\Random::base58() ` but has been
22692272modified to provide the largest value that can safely be used in URLs
22702273without needing to take extra characters into consideration because it is
@@ -2281,11 +2284,10 @@ echo $random->base62(); // z0RkwHfh8ErDM1xw
22812284
22822285
22832286``` php
2284- public function base64( int $len = null ): string;
2287+ public function base64( int $len = int ): string;
22852288```
22862289Generates a random base64 string
22872290
2288- If $len is not specified, 16 is assumed. It may be larger in future.
22892291The length of the result string is usually greater of $len.
22902292Size formula: 4($len / 3) rounded up to a multiple of 4.
22912293
@@ -2299,11 +2301,10 @@ echo $random->base64(12); // 3rcq39QzGK9fUqh8
22992301
23002302
23012303``` php
2302- public function base64Safe( int $len = null , bool $padding = bool ): string;
2304+ public function base64Safe( int $len = int , bool $padding = bool ): string;
23032305```
23042306Generates a random URL-safe base64 string
23052307
2306- If $len is not specified, 16 is assumed. It may be larger in future.
23072308The length of the result string is usually greater of $len.
23082309
23092310By default, padding is not generated because "=" may be used as a URL
@@ -2344,11 +2345,10 @@ var_dump(bin2hex($bytes));
23442345
23452346
23462347``` php
2347- public function hex( int $len = null ): string;
2348+ public function hex( int $len = int ): string;
23482349```
23492350Generates a random hex string
23502351
2351- If $len is not specified, 16 is assumed. It may be larger in future.
23522352The length of the result string is usually greater of $len.
23532353
23542354``` php
@@ -2402,13 +2402,11 @@ echo $random->uuid(); // 1378c906-64bb-4f81-a8d6-4ae1bfcdec22
24022402
24032403
24042404``` php
2405- protected function base( string $alphabet, int $base, mixed $n = null ): string;
2405+ protected function base( string $alphabet, int $base, mixed $n = int ): string;
24062406```
24072407Generates a random string based on the number ($base) of characters
24082408($alphabet).
24092409
2410- If $n is not specified, 16 is assumed. It may be larger in future.
2411-
24122410@throws Exception If secure random number generator is not available or unexpected partial read
24132411
24142412
0 commit comments