diff options
-rw-r--r-- | cryptography/hazmat/primitives/twofactor/__init__.py (renamed from cryptography/hazmat/primitives/otp/__init__.py) | 0 | ||||
-rw-r--r-- | cryptography/hazmat/primitives/twofactor/hotp.py (renamed from cryptography/hazmat/primitives/otp/hotp.py) | 0 | ||||
-rw-r--r-- | docs/hazmat/primitives/index.rst | 2 | ||||
-rw-r--r-- | docs/hazmat/primitives/twofactor.rst (renamed from docs/hazmat/primitives/otp.rst) | 13 | ||||
-rw-r--r-- | tests/hazmat/primitives/twofactor/__init__.py (renamed from tests/hazmat/primitives/otp/__init__.py) | 0 | ||||
-rw-r--r-- | tests/hazmat/primitives/twofactor/test_hotp.py (renamed from tests/hazmat/primitives/otp/test_hotp.py) | 2 |
6 files changed, 8 insertions, 9 deletions
diff --git a/cryptography/hazmat/primitives/otp/__init__.py b/cryptography/hazmat/primitives/twofactor/__init__.py index e69de29b..e69de29b 100644 --- a/cryptography/hazmat/primitives/otp/__init__.py +++ b/cryptography/hazmat/primitives/twofactor/__init__.py diff --git a/cryptography/hazmat/primitives/otp/hotp.py b/cryptography/hazmat/primitives/twofactor/hotp.py index 0bc4cc56..0bc4cc56 100644 --- a/cryptography/hazmat/primitives/otp/hotp.py +++ b/cryptography/hazmat/primitives/twofactor/hotp.py diff --git a/docs/hazmat/primitives/index.rst b/docs/hazmat/primitives/index.rst index 9121d156..5199d493 100644 --- a/docs/hazmat/primitives/index.rst +++ b/docs/hazmat/primitives/index.rst @@ -14,4 +14,4 @@ Primitives rsa constant-time interfaces - otp + twofactor diff --git a/docs/hazmat/primitives/otp.rst b/docs/hazmat/primitives/twofactor.rst index ad2c856a..2b811e1e 100644 --- a/docs/hazmat/primitives/otp.rst +++ b/docs/hazmat/primitives/twofactor.rst @@ -1,18 +1,17 @@ .. hazmat:: -One Time Password -================= +Two-factor Authentication +========================= -.. currentmodule:: cryptography.hazmat.primitives.otp +.. currentmodule:: cryptography.hazmat.primitives.twofactor -This module contains algorithms for generating and verifying one -time passwords. +This module contains algorithms related to two-factor authentication. Currently, it contains an algorithm for generating and verifying one time password values based on Hash-based message authentication codes (HMAC). -.. currentmodule:: cryptography.hazmat.primitives.otp.hotp +.. currentmodule:: cryptography.hazmat.primitives.twofactor.hotp .. class:: HOTP(key, length, backend) @@ -27,7 +26,7 @@ codes (HMAC). >>> import os >>> from cryptography.hazmat.backends import default_backend - >>> from cryptography.hazmat.primitives.otp.hotp import HOTP + >>> from cryptography.hazmat.primitives.twofactor.hotp import HOTP >>> key = b"12345678901234567890" >>> hotp = HOTP(key, 6, backend=default_backend()) diff --git a/tests/hazmat/primitives/otp/__init__.py b/tests/hazmat/primitives/twofactor/__init__.py index e69de29b..e69de29b 100644 --- a/tests/hazmat/primitives/otp/__init__.py +++ b/tests/hazmat/primitives/twofactor/__init__.py diff --git a/tests/hazmat/primitives/otp/test_hotp.py b/tests/hazmat/primitives/twofactor/test_hotp.py index 2641cb99..25dd694b 100644 --- a/tests/hazmat/primitives/otp/test_hotp.py +++ b/tests/hazmat/primitives/twofactor/test_hotp.py @@ -16,7 +16,7 @@ import os import pytest from cryptography.exceptions import InvalidToken -from cryptography.hazmat.primitives.otp.hotp import HOTP +from cryptography.hazmat.primitives.twofactor.hotp import HOTP from cryptography.hazmat.primitives import hashes from tests.utils import load_vectors_from_file, load_nist_vectors |