Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add valid until function which returns a number that will guaranteed work until the expiration date #1

Open
tilkinsc opened this issue Oct 30, 2017 · 6 comments

Comments

@tilkinsc
Copy link
Owner

[https://github.com/pyauth/pyotp/pull/5]
Awesome idea to add

tilkinsc pushed a commit that referenced this issue Dec 7, 2017
@tomdaniels41
Copy link

Hi tilkinsc,

Your function totp.valid_until() does not work for me, on both lua 5.1 and lua 5.3, it failes with the ((self.interval + 1) code.

Any ideas?

Thanks

@tilkinsc
Copy link
Owner Author

tilkinsc commented Sep 4, 2024

Hi, as you can see I haven't updated LuaOTP in a long time. I need to catch it up to speed with the https://github.com/tilkinsc/COTP library.

@tomdaniels41
Copy link

tomdaniels41 commented Sep 4, 2024 via email

@tilkinsc
Copy link
Owner Author

tilkinsc commented Sep 9, 2024

I pretty much scrapped all the code I had and writing anew. It seems like I can't find a sha1 library that isn't dogwater. If you can find one that I can just yeehaw and it outputs correct results compared to openssl in C with a permissive license, then I will be willing to finish it up.

@tomdaniels41
Copy link

Have you looked at http://25thandclement.com/~william/projects/luaossl.html it supports SHA1

The Git project
https://github.com/wahern/luaossl

The windows supported version of luaossl
https://github.com/daurnimator/luaossl

@tilkinsc
Copy link
Owner Author

tilkinsc commented Sep 10, 2024

This involves distributing openssl and/or a dll, which their repository actually infringes openssl's license I think. I have 0 interest in integrating with LuaRocks, as this is supposed to be a stand alone single file sort of deal despite what it is/was originally (You just have to git clone and require). Yet, its expected of you to provide your own functionality for time and crypto. I just can't find anything to rightfully test the library. Nonetheless to learn this lib that should just have something like sha1.hmac(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants