TOTP Class

Properties   Methods   Events   Configuration Settings   Errors  

The TOTP class allows creation of Time-Based One-Time passwords.

Syntax

IPWorksAuthTOTP
IPWorksAuthTOTPSwift

Remarks

The TOTP class implements the TOTP algorithm defined in RFC 6238 (Time-Based One-Time Password). These types of passwords are commonly used as a second factor of authentication in multi-factor authentication scenarios.

To begin specify the shared secret in the Secret property.

Next, you may set TimeStep. If this property is not set, the class will use a default value.

To create the password call CreatePassword. The Password property will be populated with the new password.

To validate a password set the Password property and call ValidatePassword. The method will return True or False to indicate success or failure.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

- passwordThe Time-Based One Time Password.
- secretThe Base32 encoded shared secret used when creating and validating a password.
- timeStepThe time step (in seconds) used for Time-Based One Time Password creation or validation.
- validityTimeThe validity time of the created password.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

- configSets or retrieves a configuration setting.
- createPasswordCreates a Time-Based One Time Password.
- resetReset the variables to default value.
- validatePasswordValidates a Time-Based One Time Password.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

- onErrorInformation about errors during data delivery.

Configuration Settings


The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.

CurrentTimeThe current time in milliseconds.
FuturePasswordsAcceptedThe number of future passwords to accept.
HashAlgorithmThe hash algorithm used to sign the password.
PasswordLengthThe length of the generated password.
PreviousPasswordsAcceptedThe number of previous passwords to accept.
SecretLengthThe length of secret to generate.
ValidityTimeThe validity time of the created TOTP password.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Auth 2020 iOS Edition - Version 20.0 [Build 8155]