codebude / QRCoder

A pure C# Open Source QR Code implementation
MIT License
4.56k stars 1.09k forks source link

Merge HOTP and TOTP algorithms into this library? #72

Closed tilkinsc closed 6 years ago

tilkinsc commented 7 years ago

Would be a neat addition. I have made several.

For people using TOTP in C#, it would go a lot more smoothly than importing yet another library. It is small and simple and I could do it.

Thoughts?

codebude commented 7 years ago

Hi @Hydroque ,

thanks for you offer and I really appreciate it. But before doing work which has already been done, have a look at the OneTimePassword payload generator: https://github.com/codebude/QRCoder/blob/master/QRCoder/PayloadGenerator.cs#L1472 There is already a HOTP/TOTP implementation. If you idea/implementation is different or I didn't got what you mean, feel free to contribute. :-)

tilkinsc commented 7 years ago

Yes, I understand what you have. Apart from URLs, you have the actual data. https://github.com/Hydroque/LuaOTP

codebude commented 7 years ago

Ok, you meant not only the payload's structure, but the contents. So you meant to deliver a HOTP/TOTP generator. Feel free to write one and send a merge request.

Sebazzz commented 6 years ago

I would vote against it. It is out of scope for this library. This library focuses on generating QR codes and encoding data for those QR codes. Generating TFA codes themselves is a seperate responsibility and should belong in a seperate library.

tilkinsc commented 6 years ago

It is so widely used that it doesn't matter.