Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
11.0
11.1
11.2
11.3
11.4
11.5
12.0
12.1
12.2
12.3
Statistic
FMM
Blog
TOTP.Calculate
Calculates a Time-based one-time password.
Component | Version | macOS | Windows | Linux | Server | iOS SDK | License |
TOTP | 12.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | Free |
MBS( "TOTP.Calculate"; Key; TimeNow; TimeStart; TimeStep; DigitCount ) More
Parameters
Parameter | Description | Example |
---|---|---|
Key | The secret to use. | "12345678" |
TimeNow | The current time. In seconds. |
MBS("TOTP.CurrentTime") |
TimeStart | The start time. In seconds. |
0 |
TimeStep | The step value defining the duration the code is valid. In Seconds. |
30 |
DigitCount | The number of digits to generate. | 6 |
Result
Returns value or error.
Description
Calculates a Time-based one-time password.Uses SHA-1 as hash algorithm.
Examples
Calculate a code:
Set Variable [$code; Value: MBS( "TOTP.Calculate"; "12345678"; MBS("TOTP.CurrentTime"); 0; 30; 6 ) ]
See also
Release notes
- Version 12.3
- Added TOTP.Calculate function and TOTP.CurrentTime function to create Time-based one-time passwords.
Created 24th May 2022, last changed 24th May 2022
TAPI.Unpark - TOTP.CurrentTime
Feedback: Report problem or ask question.
