PyOTP 2.2.7__py2.py3-none-any.whl → 2.2.8__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pyotp/utils.py CHANGED
@@ -106,4 +106,4 @@ def strings_equal(s1, s2):
106
106
  """
107
107
  s1 = unicodedata.normalize('NFKC', s1)
108
108
  s2 = unicodedata.normalize('NFKC', s2)
109
- return compare_digest(s1, s2)
109
+ return compare_digest(s1.encode(), s2.encode())
@@ -0,0 +1,21 @@
1
+ Copyright (C) 2011-2017 Mark Percival <m@mdp.im>,
2
+ Nathan Reynolds <email@nreynolds.co.uk>, Andrey Kislyuk <kislyuk@gmail.com>,
3
+ and PyOTP contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyotp
3
- Version: 2.2.7
3
+ Version: 2.2.8
4
4
  Summary: Python One Time Password Library
5
5
  Home-page: https://github.com/pyotp/pyotp
6
6
  Author: PyOTP contributors
@@ -14,8 +14,10 @@ Classifier: Operating System :: MacOS :: MacOS X
14
14
  Classifier: Operating System :: POSIX
15
15
  Classifier: Programming Language :: Python
16
16
  Classifier: Programming Language :: Python :: 2.7
17
- Classifier: Programming Language :: Python :: 3.3
18
17
  Classifier: Programming Language :: Python :: 3.4
18
+ Classifier: Programming Language :: Python :: 3.5
19
+ Classifier: Programming Language :: Python :: 3.6
20
+ Classifier: Programming Language :: Python :: 3.7
19
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
22
 
21
23
  PyOTP - The Python One-Time Password Library
@@ -41,14 +43,16 @@ minimum, application implementers should follow this checklist:
41
43
  - Deny replay attacks by rejecting one-time passwords that have been used by the client (this requires storing the most
42
44
  recently authenticated timestamp, OTP, or hash of the OTP in your database, and rejecting the OTP when a match is seen)
43
45
  - Throttle brute-force attacks against your application's login functionality
44
- - When implementing a "green field" application, consider supporting
45
- `FIDO U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_ in addition to HOTP/TOTP. U2F uses asymmetric
46
- cryptography to avoid using a shared secret design, which strengthens your MFA solution against server-side compromise.
47
- Hardware U2F also sequesters the client secret in a dedicated single-purpose device, which strengthens your clients
48
- against client-side compromise.
46
+ - When implementing a "greenfield" application, consider supporting
47
+ `FIDO U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_/`WebAuthn <https://www.w3.org/TR/webauthn/>`_ in
48
+ addition to HOTP/TOTP. U2F uses asymmetric cryptography to avoid using a shared secret design, which strengthens your
49
+ MFA solution against server-side attacks. Hardware U2F also sequesters the client secret in a dedicated single-purpose
50
+ device, which strengthens your clients against client-side attacks. And by automating scoping of credentials to
51
+ relying party IDs (application origin/domain names), U2F adds protection against phishing attacks. One implementation of
52
+ FIDO U2F/WebAuthn is PyOTP's sister project, `PyWARP <https://github.com/pyauth/pywarp>`_.
49
53
 
50
54
  We also recommend that implementers read the
51
- `OWASP Authentication Cheat Sheet <https://www.owasp.org/index.php/Authentication_Cheat_Sheet>`_ and
55
+ `OWASP Authentication Cheat Sheet <https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md>`_ and
52
56
  `NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_ for a high level overview of
53
57
  authentication best practices.
54
58
 
@@ -122,7 +126,7 @@ Working example
122
126
 
123
127
  Scan the following barcode with your phone's OTP app (e.g. Google Authenticator):
124
128
 
125
- .. image:: http://chart.apis.google.com/chart?cht=qr&chs=250x250&chl=otpauth%3A%2F%2Ftotp%2Falice%40google.com%3Fsecret%3DJBSWY3DPEHPK3PXP
129
+ .. image:: https://chart.apis.google.com/chart?cht=qr&chs=250x250&chl=otpauth%3A%2F%2Ftotp%2Falice%40google.com%3Fsecret%3DJBSWY3DPEHPK3PXP
126
130
 
127
131
  Now run the following and compare the output::
128
132
 
@@ -141,9 +145,14 @@ Links
141
145
  * `RFC 6238: TOTP: Time-Based One-Time Password Algorithm <https://tools.ietf.org/html/rfc6238>`_
142
146
  * `ROTP <https://github.com/mdp/rotp>`_ - Original Ruby OTP library by `Mark Percival <https://github.com/mdp>`_
143
147
  * `OTPHP <https://github.com/lelag/otphp>`_ - PHP port of ROTP by `Le Lag <https://github.com/lelag>`_
144
- * `OWASP Authentication Cheat Sheet <https://www.owasp.org/index.php/Authentication_Cheat_Sheet>`_
148
+ * `OWASP Authentication Cheat Sheet <https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Authentication_Cheat_Sheet.md>`_
145
149
  * `NIST SP 800-63-3: Digital Authentication Guideline <https://pages.nist.gov/800-63-3/>`_
146
150
 
151
+ For new applications:
152
+
153
+ * `WebAuthn <https://www.w3.org/TR/webauthn/>`_
154
+ * `PyWARP <https://github.com/pyauth/pywarp>`_
155
+
147
156
  .. image:: https://img.shields.io/travis/pyotp/pyotp.svg
148
157
  :target: https://travis-ci.org/pyotp/pyotp
149
158
  .. image:: https://img.shields.io/codecov/c/github/pyotp/pyotp/master.svg
@@ -0,0 +1,11 @@
1
+ pyotp/__init__.py,sha256=hamm6NeVXq0-y6jlBlVnO7oct5n5EHWltinaBxge8xk,685
2
+ pyotp/compat.py,sha256=QVb4buImn4PyP0qe5uLiXsO2-p4ItTGl01Vbt2dILNE,222
3
+ pyotp/hotp.py,sha256=Jotukhsjpwpbx05iHHPYgH0HzpAFUvRAnWauQ_4N69M,1772
4
+ pyotp/otp.py,sha256=QPyHxZ7fY7_zlrMVVveGQrCfn6gatpaHO3-ok9XwCaU,2344
5
+ pyotp/totp.py,sha256=EHnv9irTDDt2cLUIxy3w_80QaqtduAM08Xq7rU2bIm0,3168
6
+ pyotp/utils.py,sha256=smffRHfGU9fwpzmkLrKz6Z3xt07-PEJ2lf8mJ1Tvn7I,3513
7
+ pyotp-2.2.8.dist-info/LICENSE,sha256=f1C5lELlDYN3777_-tBjT7mgRr6HCXrzppnWNwsOG2M,1174
8
+ pyotp-2.2.8.dist-info/METADATA,sha256=OHVMnmqShG3BbmFJPG9C6bi50zdvLZ27XJHr_NOq148,8004
9
+ pyotp-2.2.8.dist-info/WHEEL,sha256=h_aVn5OB2IERUjMbi2pucmR_zzWJtk303YXvhh60NJ8,110
10
+ pyotp-2.2.8.dist-info/top_level.txt,sha256=rFDgz6Sm4nbkYk6tlSRiMcJPyYdnY6LcZiAaYTxVc5k,6
11
+ pyotp-2.2.8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.31.0)
2
+ Generator: bdist_wheel (0.33.4)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any
@@ -1,10 +0,0 @@
1
- pyotp/__init__.py,sha256=hamm6NeVXq0-y6jlBlVnO7oct5n5EHWltinaBxge8xk,685
2
- pyotp/compat.py,sha256=QVb4buImn4PyP0qe5uLiXsO2-p4ItTGl01Vbt2dILNE,222
3
- pyotp/hotp.py,sha256=Jotukhsjpwpbx05iHHPYgH0HzpAFUvRAnWauQ_4N69M,1772
4
- pyotp/otp.py,sha256=QPyHxZ7fY7_zlrMVVveGQrCfn6gatpaHO3-ok9XwCaU,2344
5
- pyotp/totp.py,sha256=EHnv9irTDDt2cLUIxy3w_80QaqtduAM08Xq7rU2bIm0,3168
6
- pyotp/utils.py,sha256=1v--gUDj8GLvwKElYp-HeElWQZAHHHMDhqHGo800VGg,3495
7
- pyotp-2.2.7.dist-info/METADATA,sha256=OFpNjao385Qg5ALlw8z5wF4ooHE8AX0gC-Mm0A2NA8g,7411
8
- pyotp-2.2.7.dist-info/RECORD,,
9
- pyotp-2.2.7.dist-info/WHEEL,sha256=J3CsTk7Mf2JNUyhImI-mjX-fmI4oDjyiXgWT4qgZiCE,110
10
- pyotp-2.2.7.dist-info/top_level.txt,sha256=rFDgz6Sm4nbkYk6tlSRiMcJPyYdnY6LcZiAaYTxVc5k,6