@@ -39,30 +39,30 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | interface ISecureRandom { |
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * Flags for characters that can be used for <code>generate($length, $characters)</code> |
|
| 44 | - */ |
|
| 45 | - const CHAR_UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
|
| 46 | - const CHAR_LOWER = 'abcdefghijklmnopqrstuvwxyz'; |
|
| 47 | - const CHAR_DIGITS = '0123456789'; |
|
| 48 | - const CHAR_SYMBOLS = '!\"#$%&\\\'()*+,-./:;<=>?@[\]^_`{|}~'; |
|
| 42 | + /** |
|
| 43 | + * Flags for characters that can be used for <code>generate($length, $characters)</code> |
|
| 44 | + */ |
|
| 45 | + const CHAR_UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
|
| 46 | + const CHAR_LOWER = 'abcdefghijklmnopqrstuvwxyz'; |
|
| 47 | + const CHAR_DIGITS = '0123456789'; |
|
| 48 | + const CHAR_SYMBOLS = '!\"#$%&\\\'()*+,-./:;<=>?@[\]^_`{|}~'; |
|
| 49 | 49 | |
| 50 | - /** |
|
| 51 | - * Characters that can be used for <code>generate($length, $characters)</code>, to |
|
| 52 | - * generate human readable random strings. Lower- and upper-case characters and digits |
|
| 53 | - * are included. Characters which are ambiguous are excluded, such as I, l, and 1 and so on. |
|
| 54 | - */ |
|
| 55 | - const CHAR_HUMAN_READABLE = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789'; |
|
| 50 | + /** |
|
| 51 | + * Characters that can be used for <code>generate($length, $characters)</code>, to |
|
| 52 | + * generate human readable random strings. Lower- and upper-case characters and digits |
|
| 53 | + * are included. Characters which are ambiguous are excluded, such as I, l, and 1 and so on. |
|
| 54 | + */ |
|
| 55 | + const CHAR_HUMAN_READABLE = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789'; |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * Generate a random string of specified length. |
|
| 59 | - * @param int $length The length of the generated string |
|
| 60 | - * @param string $characters An optional list of characters to use if no character list is |
|
| 61 | - * specified all valid base64 characters are used. |
|
| 62 | - * @return string |
|
| 63 | - * @since 8.0.0 |
|
| 64 | - */ |
|
| 65 | - public function generate(int $length, |
|
| 66 | - string $characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'): string; |
|
| 57 | + /** |
|
| 58 | + * Generate a random string of specified length. |
|
| 59 | + * @param int $length The length of the generated string |
|
| 60 | + * @param string $characters An optional list of characters to use if no character list is |
|
| 61 | + * specified all valid base64 characters are used. |
|
| 62 | + * @return string |
|
| 63 | + * @since 8.0.0 |
|
| 64 | + */ |
|
| 65 | + public function generate(int $length, |
|
| 66 | + string $characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'): string; |
|
| 67 | 67 | |
| 68 | 68 | } |