From 2d707061d30b57b84ae2217ac3e55a5c7f203897 Mon Sep 17 00:00:00 2001 From: Mitsukuni Sato Date: Tue, 10 Nov 2020 17:03:51 +0900 Subject: [PATCH] Fixed TOTP verify argument --- more-cryptographic-concepts/one-time-passwords-otp-example.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/more-cryptographic-concepts/one-time-passwords-otp-example.md b/more-cryptographic-concepts/one-time-passwords-otp-example.md index 3eb3f0d..270b24a 100644 --- a/more-cryptographic-concepts/one-time-passwords-otp-example.md +++ b/more-cryptographic-concepts/one-time-passwords-otp-example.md @@ -72,9 +72,9 @@ import pyotp base32secret = 'S3K3TPI5MYA2M67V' print('Secret:', base32secret) -totp = pyotp.TOTP(base32secret) +totp = pyotp.totp.TOTP(base32secret) your_code = '123456' -print(totp.verify('Code Valid:', your_code)) +print('Code Valid: ', totp.verify(your_code)) ``` Run the above code example: [https://repl.it/@nakov/QR-code-scanner-in-Python](https://repl.it/@nakov/QR-code-scanner-in-Python).