aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2019-01-17 15:55:33 -0600
committerAlex Gaynor <alex.gaynor@gmail.com>2019-01-17 16:55:33 -0500
commit2b40f493bf6f9eb131b46d7ab582b89033bcda64 (patch)
tree64c0bcb76bb8081714ecde50937673ac3d3dab57 /docs/hazmat
parent27585690ac8379b711391eb24c466d6ea1786609 (diff)
downloadcryptography-2b40f493bf6f9eb131b46d7ab582b89033bcda64.tar.gz
cryptography-2b40f493bf6f9eb131b46d7ab582b89033bcda64.tar.bz2
cryptography-2b40f493bf6f9eb131b46d7ab582b89033bcda64.zip
support byteslike for OTP (#4710)
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/primitives/twofactor.rst14
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/hazmat/primitives/twofactor.rst b/docs/hazmat/primitives/twofactor.rst
index b48db599..51625dfc 100644
--- a/docs/hazmat/primitives/twofactor.rst
+++ b/docs/hazmat/primitives/twofactor.rst
@@ -41,9 +41,10 @@ codes (HMAC).
>>> hotp_value = hotp.generate(0)
>>> hotp.verify(hotp_value, 0)
- :param bytes key: Per-user secret key. This value must be kept secret
- and be at least 128 :term:`bits`. It is recommended that
- the key be 160 bits.
+ :param key: Per-user secret key. This value must be kept secret
+ and be at least 128 :term:`bits`. It is recommended that
+ the key be 160 bits.
+ :type key: :term:`bytes-like`
:param int length: Length of generated one time password as ``int``.
:param cryptography.hazmat.primitives.hashes.HashAlgorithm algorithm: A
:class:`~cryptography.hazmat.primitives.hashes`
@@ -163,9 +164,10 @@ similar to the following code.
>>> totp_value = totp.generate(time_value)
>>> totp.verify(totp_value, time_value)
- :param bytes key: Per-user secret key. This value must be kept secret
- and be at least 128 :term:`bits`. It is recommended that the
- key be 160 bits.
+ :param key: Per-user secret key. This value must be kept secret
+ and be at least 128 :term:`bits`. It is recommended that the
+ key be 160 bits.
+ :type key: :term:`bytes-like`
:param int length: Length of generated one time password as ``int``.
:param cryptography.hazmat.primitives.hashes.HashAlgorithm algorithm: A
:class:`~cryptography.hazmat.primitives.hashes`