FOF30\Encrypt\Totp::__construct PHP Метод

__construct() публичный Метод

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.
public __construct ( integer $timeStep = 30, integer $passCodeLength = 6, integer $secretLength = 10, Base32 $base32 = null )
$timeStep integer The Time Step (in seconds). Use 30 to be compatible with Google Authenticator.
$passCodeLength integer The generated passcode length. Default: 6 digits.
$secretLength integer The length of the secret key. Default: 10 bytes (80 bits).
$base32 Base32 The base32 en/decrypter
    public function __construct($timeStep = 30, $passCodeLength = 6, $secretLength = 10, Base32 $base32 = null)
    {
        $this->timeStep = $timeStep;
        $this->passCodeLength = $passCodeLength;
        $this->secretLength = $secretLength;
        $this->pinModulo = pow(10, $this->passCodeLength);
        if (is_null($base32)) {
            $this->base32 = new Base32();
        } else {
            $this->base32 = $base32;
        }
    }