]> git.mar77i.info Git - ga-cli/commitdiff
rename binary to a more correct 'totp'
authormar77i <mar77i@protonmail.ch>
Wed, 27 Jun 2018 21:22:03 +0000 (23:22 +0200)
committermar77i <mar77i@protonmail.ch>
Wed, 27 Jun 2018 21:59:21 +0000 (23:59 +0200)
.gitignore
Makefile
totp.c [moved from otp.c with 97% similarity]

index 123a83bd4fe8019951a9f3aa1023172ceb22e590..008f457334aa46f3ddf6cd3241426a0cca8d0937 100644 (file)
@@ -1,2 +1,2 @@
-otp
-otp.o
+totp
+totp.o
index 3e8c5249ae0bed3818171d093eab777740800c92..f1a84c1b1dea514c9388c22c06bb791202c74073 100644 (file)
--- 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 97bf387246a61aa4328f7c4847bf0e1c2eda89e5..d2d53c90546ac3c2f28c012fa3a19c91ef4434fe 100644 (file)
--- a/otp.c
+++ b/totp.c
@@ -1,5 +1,5 @@
 
-// otp.c
+// totp.c
 
 #include <ctype.h>
 #include <inttypes.h>
@@ -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.");