Timed One Time Password (TOTP)

August 17th, 2009 by Dragos Leave a reply »

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.

Download class

July 2008 Number 6

July 2008 Number 6

One time passwords are useful to provide authorization to access restricted resources during a single access.

This class enhances the concept of one time passwords by giving a single access to the resources for a limited period of time.

Manuel Lemos

VN:F [1.9.22_1171]
Rating: 8.0/10 (1 vote cast)
Timed One Time Password (TOTP), 8.0 out of 10 based on 1 rating
Advertisement

1 comment

  1. Adam Taylor says:

    I have a client who wants to generate a password and give their customers one-time access to their site. After that initial visit, the password expires, and the customer will have to contact them again to access the site.

    I downloaded your code, and I see the password (and timer), but I’m not sure how to use that passcode to protect their website. Any suggestions? Thank you!

    VA:F [1.9.22_1171]
    Rating: 5.0/5 (1 vote cast)
    VA:F [1.9.22_1171]
    Rating: +1 (from 1 vote)