From c746245357198541fbf67c1151191566a8b18ac1 Mon Sep 17 00:00:00 2001 From: mar77i Date: Wed, 27 Jun 2018 23:22:03 +0200 Subject: [PATCH] rename binary to a more correct 'totp' --- .gitignore | 4 ++-- Makefile | 2 +- otp.c => totp.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) rename otp.c => totp.c (97%) diff --git a/.gitignore b/.gitignore index 123a83b..008f457 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -otp -otp.o +totp +totp.o diff --git a/Makefile b/Makefile index 3e8c524..f1a84c1 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CFLAGS += -D_DEFAULT_SOURCE $(PROD_CFLAGS) LDFLAGS += $(PROD_LDFLAGS) LDLIBS += -lcrypto -otp: otp.o +totp: totp.o all: diff --git a/otp.c b/totp.c similarity index 97% rename from otp.c rename to totp.c index 97bf387..d2d53c9 100644 --- a/otp.c +++ b/totp.c @@ -1,5 +1,5 @@ -// otp.c +// totp.c #include #include @@ -101,7 +101,7 @@ static inline unsigned char *pack_be64(unsigned char data[], uint64_t value) { return data; } -int calculate_otp(const char *line) { +int calculate_totp(const char *line) { size_t len = 0; unsigned int hmac_len = 0; unsigned char data[sizeof(uint64_t)], *ptr, i; @@ -153,7 +153,7 @@ int main(void) { return EXIT_FAILURE; } while(fgets(buf, sizeof buf, fh) != NULL) - if(calculate_otp(buf) < 0) + if(calculate_totp(buf) < 0) goto error; if(ferror(fh)) { fprintf(stderr, "Error: read error."); -- 2.47.0