From: mar77i Date: Wed, 27 Jun 2018 21:22:03 +0000 (+0200) Subject: rename binary to a more correct 'totp' X-Git-Url: https://git.mar77i.info/?a=commitdiff_plain;h=c746245357198541fbf67c1151191566a8b18ac1;p=ga-cli rename binary to a more correct 'totp' --- 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.");