summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeppia <seppia@seppia.net>2018-07-03 20:10:21 +0200
committerSeppia <seppia@seppia.net>2018-07-03 20:10:21 +0200
commitd0e2a9f93ae165f87cb1045c8395a70b3a81f505 (patch)
tree8254ac96b9a4354b7567a91c3050a74da4755ffd
parentaecfca693a9e846c5d8e73c49d4f1542c49e61fb (diff)
downloadonetimebluh-d0e2a9f93ae165f87cb1045c8395a70b3a81f505.tar.gz
onetimebluh-d0e2a9f93ae165f87cb1045c8395a70b3a81f505.tar.bz2
onetimebluh-d0e2a9f93ae165f87cb1045c8395a70b3a81f505.zip
Print generating key message
Printing message while generating key and fixed order of messages in the same function.
-rw-r--r--src/onetimebluh.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/onetimebluh.c b/src/onetimebluh.c
index dac7c44..4ceee04 100644
--- a/src/onetimebluh.c
+++ b/src/onetimebluh.c
@@ -251,14 +251,15 @@ void keyrand (int64_t nb, char* outp) {
nb = 1048576;
}
- unsigned char* key = malloc (nb);
- RAND_bytes (key, nb);
-
if (outp == NULL) {
outp = defoutp;
printf ("No output name specified... using default value: default.key \n");
}
+ printf ("Generating pad...\n");
+ unsigned char* key = malloc (nb);
+ RAND_bytes (key, nb);
+
FILE* file = fopen (outp, "w");
fwrite (key, sizeof(char), nb, file);
fclose (file);