GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The GenerateTOTP function generates a Time-Based One-Time Password based on the RFC 6238.
Syntax/Parameters
Syntax
int = GenerateTOTP ( string key | byte key[], [string algorithm],
[string date], [byte
digits], [dword timestep] );
Parameters
key
A string or byte array representing the shared secret used to generate the password. If a string is passed the contents are assumed to be Base32 encoded.
algorithm
An optional string specifying the cryptographic algorithm to use for creating the TOTP value. The accepted modes for RFC 6238 are: “SHA1”, “SHA256” and “SHA512”. Other acceptable values are based on the list provided by Cryptography API: Next Generation documentation. The default value is “SHA1”.
date
An optional string specifying the date and time to use when generating the password. The default is the current date and time.
digits
An optional byte value specifying the number of digits in the resulting password. The default is 6.
timestep
An optional dword specifying the life of the password in seconds. The default is 30 seconds.
Return Value
Returns an int as the one-time password or a formatted error code. The return value may have less digits than the digits parameter if the resulting password had leading 0s.
Remarks
A Time-based One-Time Password (TOTP) is created by an algorithm that generates a one-time password (OTP) that uses the current time as a source of uniqueness. As an extension of the HMAC-based one-time password algorithm (HOTP), it has been adopted as Internet Engineering Task Force (IETF) standard RFC 6238.
The key is generally provided by the site of system where the TOTP will be used. The other parameters, except date, are set by that same system and need to match.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.