Default counter to current seconds since epoch

This commit is contained in:
Lucas 2020-06-14 18:11:59 +00:00
parent ecc23ff01f
commit 24fbaa6e82
1 changed files with 2 additions and 1 deletions

3
cli.c
View File

@ -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;