Default counter to current seconds since epoch
This commit is contained in:
parent
ecc23ff01f
commit
24fbaa6e82
1 changed files with 2 additions and 1 deletions
3
cli.c
3
cli.c
|
@ -19,6 +19,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "err.h"
|
||||
|
@ -47,7 +48,7 @@ main(int argc, char *argv[])
|
|||
int ch, digits, do_hotp;
|
||||
enum otp_hmac hmac;
|
||||
|
||||
counter = 0;
|
||||
counter = (uint64_t)time(NULL);
|
||||
digits = 6;
|
||||
do_hotp = 0;
|
||||
hmac = OTP_HMAC_SHA1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue