diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-04-02 14:12:13 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-04-02 14:12:13 +0200 |
commit | 979ec38ec44bf223c6578bffd5201d2de18a89c7 (patch) | |
tree | 17590ba7ceba4ffac07754b7c7f1eef93cd72054 | |
parent | e99450e2e2c28e6ae8c68b40e3f99d4a1ff3e63e (diff) | |
download | exchange-979ec38ec44bf223c6578bffd5201d2de18a89c7.tar.xz |
left-pad TOTP code with 0s
-rw-r--r-- | src/util/crypto_confirmation.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/crypto_confirmation.c b/src/util/crypto_confirmation.c index c5a674501..e52562e3e 100644 --- a/src/util/crypto_confirmation.c +++ b/src/util/crypto_confirmation.c @@ -189,7 +189,7 @@ executive_totp (void *h_key, if (NULL == ret) { GNUNET_asprintf (&ret, - "%llu", + "%08llu", (unsigned long long) code); } else @@ -197,7 +197,7 @@ executive_totp (void *h_key, char *tmp; GNUNET_asprintf (&tmp, - "%s\n%llu", + "%s\n%08llu", ret, (unsigned long long) code); GNUNET_free (ret); |