TOTP aka Time Based One Time Password.
Posted: Tuesday 6th December 2022 5:19pm
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 ). 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 !!!
I hope the class will be useful to someone !!!