|
static | $type = 'undefined' |
|
См. определение в файле otpalgorithm.php строка 9
◆ generateOTP()
Main method, generate OTP value for provided counter
- Аргументы
-
string | int | $counter | Counter. |
- Возвращает
- string
См. определение в файле otpalgorithm.php строка 125
◆ generateUri()
generateUri |
( |
| $label, |
|
|
array | $opts = [] ) |
◆ getAppScheme()
Return algorithm scheme Mostly used for generate provision URI
- Возвращает
- string
См. определение в файле otpalgorithm.php строка 232
◆ getDigest()
Returns digest algorithm used to calculate the OTP. Mostly used for generate provision URI
- Возвращает
- string
См. определение в файле otpalgorithm.php строка 201
◆ getDigits()
Return digits (password length)
- Возвращает
- int
См. определение в файле otpalgorithm.php строка 211
◆ getSecret()
Return used secret (binary)
- Возвращает
- string
См. определение в файле otpalgorithm.php строка 74
◆ getSyncParameters()
getSyncParameters |
( |
| $inputA, |
|
|
| $inputB ) |
|
abstract |
Return synchronized user params for provided inputs
- Аргументы
-
string | $inputA | First code. |
string | null | $inputB | Second code. Must be provided if current OtpAlgorithm required it (see isTwoCodeRequired). |
- Возвращает
- string
- Исключения
-
Переопределяется в HotpAlgorithm и TotpAlgorithm.
◆ getType()
◆ isStringsEqual()
isStringsEqual |
( |
| $expected, |
|
|
| $actual ) |
|
protected |
A timing safe comparison method
- Аргументы
-
string | $expected | Expected string (e.g. input from user). |
string | $actual | Actual string (e.g. generated password). |
- Возвращает
- bool
- Исключения
-
См. определение в файле otpalgorithm.php строка 170
◆ isTwoCodeRequired()
Require or not two code for synchronize parameters
- Возвращает
- bool
См. определение в файле otpalgorithm.php строка 45
◆ setSecret()
Set new secret
- Аргументы
-
string | $secret | Secret (binary). |
- Возвращает
- $this
См. определение в файле otpalgorithm.php строка 56
◆ toByte()
Convert value to byte string with padding
- Аргументы
-
string | int | $value | Value for convert. Must be unsigned integer, e.g. 123, '123', '0x7b', etc. |
- Возвращает
- string
См. определение в файле otpalgorithm.php строка 150
◆ verify()
verify |
( |
| $input, |
|
|
| $params = null ) |
|
abstract |
Verify provided input
- Аргументы
-
string | $input | Input received from user. |
string | $params | Synchronized user params, saved for this algorithm (see getSyncParameters). |
- Возвращает
- array [ bool isSuccess (Valid input or not), string newParams (Updated user params for this OtpAlgorithm) ]
Переопределяется в HotpAlgorithm.
◆ $appScheme
◆ $digest
◆ $digits
◆ $requireTwoCode
◆ $secret
◆ $type