Function group | Execute on client | Platform(s) |
---|---|---|
OW3 | NO | All |
OW3.$totpvalidate(xSharedSecretKey, iTimeStep, iDigits, iTOTP [,&cErrorText, iHashType=kOW3hashSHA1, iStepsBefore=2, iStepsAfter=1])
Validates the Time-based One-Time Password in iTOTP using the TOTP algorithm. Returns true if iTOTP is a valid TOTP. The paremeters are:
Parameter | Description |
---|---|
xSharedSecretKey | (Binary) The shared secret key, length must be between 16 and 256 bytes inclusive. |
iTimeStep | (Integer 32 bit) The time step in seconds, must be between 1 and 3600 inclusive. |
iDigits | (Integer 32 bit) The number of digits in the TOTP, must be between 6 and 8 inclusive. |
iTOTP | (Integer 32 bit) The TOTP that is to be validated. |
cErrorText | (Character 100000000) If supplied, receives text describing the error that caused $totpgenerate or $totpvalidate to return false. |
iHashType | (Integer 32 bit, default is kOW3hashSHA1) The type of hash to use, a kOW3hash… constant. |
iStepsBefore | (Integer 32 bit, default is 2) The number of time steps before the step for the current time that can be checked when validating the supplied TOTP, must be between 1 and 20 inclusive. |
iStepsAfter | (Integer 32 bit, default is 1) The number of time steps after the step for the current time that can be checked when validating the supplied TOTP, must be between 1 and 20 inclusive. |
See OW3.$totpgenerate().