gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: -use 8 digits


From: gnunet
Subject: [taler-anastasis] branch master updated: -use 8 digits
Date: Wed, 29 Sep 2021 23:04:25 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new a16b154  -use 8 digits
a16b154 is described below

commit a16b1544ffb8d5a62fb06795abfd9490c6a4376c
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Sep 29 23:04:23 2021 +0200

    -use 8 digits
---
 src/authorization/anastasis_authorization_plugin_totp.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/src/authorization/anastasis_authorization_plugin_totp.c 
b/src/authorization/anastasis_authorization_plugin_totp.c
index 68e8def..0934910 100644
--- a/src/authorization/anastasis_authorization_plugin_totp.c
+++ b/src/authorization/anastasis_authorization_plugin_totp.c
@@ -191,17 +191,8 @@ compute_totp (int time_off,
     for (int count = 0; count < 4; count++)
       code |= hmac[offset + 3 - count] << (8 * count);
     code &= 0x7fffffff;
-
-#if VAR_DIGITS
-    if (digits == 6)
-      code = code % 1000000;
-    else if (digits == 7)
-      code = code % 10000000;
-    else if (digits == 8)
-      code = code % 100000000;
-#else
-    code = code % 1000000;
-#endif
+    /* always use 8 digits (maximum) */
+    code = code % 100000000;
     return code;
   }
 }
@@ -246,10 +237,6 @@ totp_start (void *cls,
     want = compute_totp (i,
                          data,
                          data_length);
-    fprintf (stderr,
-             "TOTP %d: %llu\n",
-             i,
-             (unsigned long long) want);
     ANASTASIS_hash_answer (want,
                            &as->valid_replies[off++]);
   }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]