$totp->generate()
Generates the current TOTP code
$totp->generate(int $offset = 0): string
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $offset | int |
0
|
Optional counter offset to generate previous or upcoming codes |
Return type
string
This method modifies the existing $totp object it is applied to and returns it again.