| 1 | <?php |
||
| 10 | class RandomTokenGenerator |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $secret; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Construct. |
||
| 19 | * |
||
| 20 | * @param string $secret |
||
| 21 | */ |
||
| 22 | 4 | public function __construct($secret) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Generate a random token. |
||
| 29 | * |
||
| 30 | * @param string $intention contextual string |
||
| 31 | * |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | 4 | public function generate($intention = 'm@J0raOaUth') |
|
| 63 | } |
||
| 64 |