From d0e2a9f93ae165f87cb1045c8395a70b3a81f505 Mon Sep 17 00:00:00 2001 From: Seppia Date: Tue, 3 Jul 2018 20:10:21 +0200 Subject: Print generating key message Printing message while generating key and fixed order of messages in the same function. --- src/onetimebluh.c | 7 ++++--- 1 file 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); -- cgit v1.2.3