The HOTP class allows creation of HMAC-Based One-Time passwords.
ipworksauth_hotp_open(); ipworksauth_hotp_close($res); ipworksauth_hotp_register_callback($res, $id, $function); ipworksauth_hotp_get_last_error($res); ipworksauth_hotp_get_last_error_code($res); ipworksauth_hotp_set($res, $id, $index, $value); ipworksauth_hotp_get($res, $id, $index); ipworksauth_hotp_do_config($res, $configurationstring); ipworksauth_hotp_do_createpassword($res); ipworksauth_hotp_do_reset($res); ipworksauth_hotp_do_validatepassword($res);
The HOTP class implements the HOTP algorithm defined in RFC 4226 (HMAC-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 Counter. If this property is not set, the class will use a default value.
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
|Counter||The counter used for HMAC-Based One Time Password creation or validation.|
|Password||The HMAC-Based One Time Password.|
|Secret||The Base32 encoded shared secret used when creating and validating a password.|
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
|Config||Sets or retrieves a configuration setting.|
|CreatePassword||Creates a HMAC-Based One Time Password.|
|Reset||Reset the variables to default value.|
|ValidatePassword||Validates a HMAC-Based One Time Password.|
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
|Error||Information about errors during data delivery.|
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
|HashAlgorithm||The hash algorithm used to sign the password.|
|PasswordLength||The length of the generated password.|
|SecretLength||The length of secret to generate.|
|BuildInfo||Information about the product's build.|
|CodePage||The system code page used for Unicode to Multibyte translations.|
|LicenseInfo||Information about the current license.|
|ProcessIdleEvents||Whether the class uses its internal event loop to process events when the main thread is idle.|
|SelectWaitMillis||The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.|
|UseInternalSecurityAPI||Tells the class whether or not to use the system security libraries or an internal implementation.|