summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormar77i <mar77i@protonmail.ch>2018-06-27 23:22:03 +0200
committermar77i <mar77i@protonmail.ch>2018-06-27 23:59:21 +0200
commitc746245357198541fbf67c1151191566a8b18ac1 (patch)
tree41012ac9fde9b14c3767e71ea3821b865d5fd727
parent5a3fab7a02802a8aab4a697ba3f1e56f8cca62f0 (diff)
rename binary to a more correct 'totp'
-rw-r--r--.gitignore4
-rw-r--r--Makefile2
-rw-r--r--totp.c (renamed from otp.c)6
3 files changed, 6 insertions, 6 deletions
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
index 97bf387..d2d53c9 100644
--- 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.");