TOTP aka Time Based One Time Password.

So you have written that new, must have program. Let us see it here.
Post Reply
dockfo
Posts: 7
Joined: Monday 7th March 2022 5:38pm

TOTP aka Time Based One Time Password.

Post by dockfo »

Hello. This is my first post, greetings to everyone !!!. I wrote a small class that can be used mostly with web based applications and it utilizes the time based one time password creation. The algorithm that produces the codes is extensively explained in this video https://www.youtube.com/watch?v=VOYxF12K1vE&t=487s. The class I wrote basically utilizes the concept in this video. It is far from perfect but it is usable (I have to confess that I am not a professional programmer :o ). The class has 1 property 'SecretLenght' and three methods 'GetSecret', 'GetQRCode', and 'Verify' which are self explanatory. Embed the class in your web based project, instantiate the class with for example auth = new TOTP and use it accordingly.I have included an example of the use of the class. Because it is a web based application don't forget to enable the 'Use embedded HTTP server' support in configuration menu.
I hope the class will be useful to someone !!!
TOTP.png
TOTP.png (72.4 KiB) Viewed 4384 times
Attachments
TOTP.zip
(36.8 KiB) Downloaded 189 times
Last edited by dockfo on Wednesday 14th December 2022 11:10am, edited 1 time in total.
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: TOTP aka Time Based One Time Password.

Post by cogier »

Hi docfo and welcome to the forum.

I had a look at your program. It looks very good, but is very specialized. What plans do you have for such security?
dockfo
Posts: 7
Joined: Monday 7th March 2022 5:38pm

Re: TOTP aka Time Based One Time Password.

Post by dockfo »

Thanks cogier. Well, I am in the middle of writing a web based application and I had to add an extra attention to the security part because it will be a real production website. I have finished the log in system with remember-me cookie and so, and the 2 factor authentication is a part of it. I thought that it would be nice if someone else would like to include this kind of functionality to his project. :mrgreen:
Post Reply