MCPcopy
hub / github.com/pyca/cryptography / test_verify

Method test_verify

tests/hazmat/primitives/twofactor/test_hotp.py:68–74  ·  view source on GitHub ↗
(self, backend, params)

Source from the content-addressed store, hash-verified

66
67 @pytest.mark.parametrize("params", vectors)
68 def test_verify(self, backend, params):
69 secret = params["secret"]
70 counter = int(params["counter"])
71 hotp_value = params["hotp"]
72
73 hotp = HOTP(secret, 6, SHA1(), backend)
74 hotp.verify(hotp_value, counter)
75
76 def test_invalid_verify(self, backend):
77 secret = b"12345678901234567890"

Callers

nothing calls this directly

Calls 3

verifyMethod · 0.95
HOTPClass · 0.90
SHA1Class · 0.90

Tested by

no test coverage detected