e-CryptIt Engine Xojo Plugin |
|
Einhugur_2FA_TOTP.Validate Method
Validates value against given secret key and current time. This variation validates value for non standard standard implementation where you can choose algorithm, digits and seconds.
Parameters
- secretKey
- The secret key.
Secret keys are represented in various of ways and the plugin will preprocess them correctly to take all representations.
For example then all of the following keys are equal:
N7P7TWR3Q5WUA2XG
N7P7 TWR3 Q5WU A2XG
n7P7 tWR3 q5WU a2XG - value
- The value (6 digits entered by user or generated by GenerateValue).
- algorithm
- The algorithm to use. Standard implementation uses HMAC_SHA1.
- digits
- Digits to use. Standard implementation uses six.
- seconds
- Seconds for the time window. Standard implementation is 30 seconds.
Returns
- Boolean
- True if validation passed, else false.
Remarks
This function can throw InvalidArgumentException.
See Also
Einhugur_2FA_TOTP Class