Initialises an RFC6238-compatible TOTP generator. Please note that this class does not implement the constraint in the last paragraph of §5.2 of RFC6238. It's up to you to ensure that the same user/device does not retry validation within the same Time Step.
Signature
public function __construct([integer
$timeStep = 30,
[int
$passCodeLength = 6,
[int
$secretLength = 10,
[Object
$base32 = null]]]] )
Parameters
$timeStep
The Time Step (in seconds). Use 30 to be compatible with Google Authenticator.
$passCodeLength
The generated passcode length. Default: 6 digits.
$secretLength
The length of the secret key. Default: 10 bytes (80 bits).