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

Correction for mOTP code on Python 3 #422

Open
jcrmatos opened this issue May 2, 2019 · 0 comments
Open

Correction for mOTP code on Python 3 #422

jcrmatos opened this issue May 2, 2019 · 0 comments

Comments

@jcrmatos
Copy link

jcrmatos commented May 2, 2019

In the book, in example 3 at
http://web2py.com/books/default/chapter/29/09/access-control?search=motp#Other-options-that-can-be-applied-over-the-examples-before-
and if using Python 3, the line
hash = md5(to_hash).hexdigest()[:6]
should be
hash = md5(to_hash.encode(encoding='utf8')).hexdigest()[:6]

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

1 participant