Searched refs:hotp (Results 1 – 6 of 6) sorted by relevance
/external/python/cryptography/tests/hazmat/primitives/twofactor/ |
D | test_hotp.py | 16 from cryptography.hazmat.primitives.twofactor.hotp import HOTP 61 hotp = HOTP(secret, 6, SHA1(), backend) 63 assert hotp._dynamic_truncate(counter) == int(truncated.decode(), 16) 71 hotp = HOTP(secret, 6, SHA1(), backend) 73 assert hotp.generate(counter) == hotp_value 81 hotp = HOTP(secret, 6, SHA1(), backend) 83 assert hotp.verify(hotp_value, counter) is None 89 hotp = HOTP(secret, 6, SHA1(), backend) 92 hotp.verify(b"123456", counter) 102 hotp = HOTP(secret, 6, SHA1(), backend) [all …]
|
/external/python/cryptography/src/cryptography/hazmat/primitives/twofactor/ |
D | utils.py | 12 def _generate_uri(hotp, type_name, account_name, issuer, extra_parameters): argument 14 ("digits", hotp._length), 15 ("secret", base64.b32encode(hotp._key)), 16 ("algorithm", hotp._algorithm.name.upper()),
|
D | hotp.py | 50 hotp = truncated_value % (10 ** self._length) 51 return "{0:0{1}}".format(hotp, self._length).encode() 53 def verify(self, hotp, counter): argument 54 if not constant_time.bytes_eq(self.generate(counter), hotp):
|
D | totp.py | 12 from cryptography.hazmat.primitives.twofactor.hotp import HOTP
|
/external/python/cryptography/docs/hazmat/primitives/ |
D | twofactor.rst | 19 .. currentmodule:: cryptography.hazmat.primitives.twofactor.hotp 36 >>> from cryptography.hazmat.primitives.twofactor.hotp import HOTP 39 >>> hotp = HOTP(key, 6, SHA1()) 40 >>> hotp_value = hotp.generate(0) 41 >>> hotp.verify(hotp_value, 0) 60 :class:`~cryptography.hazmat.primitives.twofactor.hotp.HOTP`. 81 .. method:: verify(hotp, counter) 83 :param bytes hotp: The one time password value to validate. 127 def verify(hotp, counter, look_ahead): 134 otp.verify(hotp, count) [all …]
|
/external/python/cryptography/ |
D | CHANGELOG.rst | 1104 :class:`~cryptography.hazmat.primitives.twofactor.hotp.HOTP` and 1577 * Added :class:`~cryptography.hazmat.primitives.twofactor.hotp.HOTP`.
|