summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSeppia <seppia@seppio.fish>2018-07-06 11:39:39 +0200
committerSeppia <seppia@seppio.fish>2018-07-06 11:39:39 +0200
commit43e1fd07c158efe656c5ba5d3c227a2858f69916 (patch)
tree89ea9054d5c1fd30d9f392a5675b2697ec0510f1 /src
parentceb8b34275423e4e3ec12a8b9f43d4df90ab7833 (diff)
downloadonetimebluh-43e1fd07c158efe656c5ba5d3c227a2858f69916.tar.gz
onetimebluh-43e1fd07c158efe656c5ba5d3c227a2858f69916.tar.bz2
onetimebluh-43e1fd07c158efe656c5ba5d3c227a2858f69916.zip
Main headerv0.3
Created main source header file and moved appropriate declarations and function prototipes there.
Diffstat (limited to 'src')
-rw-r--r--src/libluh.h13
-rw-r--r--src/onetimebluh.c6
-rw-r--r--src/onetimebluh.h22
3 files changed, 23 insertions, 18 deletions
diff --git a/src/libluh.h b/src/libluh.h
index ba3f450..ac24376 100644
--- a/src/libluh.h
+++ b/src/libluh.h
@@ -1,19 +1,6 @@
#ifndef LIBLUH
#define LIBLUH
-#define eprintf(...) fprintf(stderr, __VA_ARGS__)
-
-typedef struct opts {
- int64_t comm;
- int64_t nbytes;
- int64_t quiet;
- int64_t tear;
- char* chars;
- char* keyfile;
- char* input;
- char* output;
-} Opts;
-
char* readInput (FILE* inputFile, uint64_t allocSize);
char* cryptXor (char* inputStr, FILE* keyFile);
char* fcryptXor (FILE* inputFile, FILE* keyFile);
diff --git a/src/onetimebluh.c b/src/onetimebluh.c
index 67cefef..2292827 100644
--- a/src/onetimebluh.c
+++ b/src/onetimebluh.c
@@ -6,13 +6,9 @@
#include <unistd.h>
#include <errno.h>
#include <error.h>
+#include "onetimebluh.h"
#include "libluh.h"
-void xor (Opts* opzioni);
-void keyrand (Opts* opzioni);
-void bluh (Opts* opzioni);
-void help (char* av[]);
-
int main (int argc, char* argv[]) {
uint64_t opt = 1;
diff --git a/src/onetimebluh.h b/src/onetimebluh.h
new file mode 100644
index 0000000..3c32e1d
--- /dev/null
+++ b/src/onetimebluh.h
@@ -0,0 +1,22 @@
+#ifndef ONETIMEBLUH
+#define ONETIMEBLUH
+
+#define eprintf(...) fprintf(stderr, __VA_ARGS__)
+
+typedef struct opts {
+ int64_t comm;
+ int64_t nbytes;
+ int64_t quiet;
+ int64_t tear;
+ char* chars;
+ char* keyfile;
+ char* input;
+ char* output;
+} Opts;
+
+void xor (Opts* opzioni);
+void keyrand (Opts* opzioni);
+void bluh (Opts* opzioni);
+void help (char* av[]);
+
+#endif