This class can be used to generate and validate one time passwords that may expire after a period of time (without using a database or saving the password of any kind).

It generates a code based on a secret key that is valid during a period of time.

The class can also be used to validate the generated code in a different server and check if the code expired.

Details

{startverticalbanner}

___________________________________________________________
PHP Time One Time Password - Version 1.5a
December 2009
___________________________________________________________
Copyright (c) 2009 Dragos Protung
_______________________
CONTENTS
_______________________
1. Description
2. System Requirements
3. How to use
4. Contact
_______________________
1. Product Description
_______________________
A PHP class that can generate a code valid for a limited time.
Based on a secret key you can generate a code that is valid only for a limited period of time
or as a one time password (OTP), so this class extends the OTP to support the valability of the code in time.
The password generated can be verified on another server (or the same) without sending the secret key
and it will be valid only for a limited time.
The encription is using is the HMAC algorithm.
It can be usefull to grant access for a limited time to a resource without saving the passwords and it's valability
and check of it's valability.
_______________________
2. System Requirements
_______________________
PHP 5.x
For PHP version prior to 5.1.2 use totp_p512.class.php
______________
3. How to use
______________
See the example file (example.php)
______________
4. Contact
______________
Please send your suggestions, bug reports and general feedback to dragos@protung.ro
Also visit http://www.protung.ro
Out for now ;)