summaryrefslogtreecommitdiff
path: root/src/input.h
diff options
context:
space:
mode:
authorJ08nY2017-02-05 03:59:52 +0100
committerJ08nY2017-02-05 03:59:52 +0100
commit763fc80153c5e9287f1b0f0609b11fb4f50c90ab (patch)
tree5cd6e7acc4512cca65bcc16a74f3b63879b2d3bc /src/input.h
parent3d9bf583ccc5eea61c5f78f52d1e2073daee924c (diff)
downloadecgen-0.2.0.tar.gz
ecgen-0.2.0.tar.zst
ecgen-0.2.0.zip
ecgen v0.2: major rewrite0.2.0
Diffstat (limited to '')
-rw-r--r--src/input.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/input.h b/src/input.h
new file mode 100644
index 0000000..b0ab421
--- /dev/null
+++ b/src/input.h
@@ -0,0 +1,51 @@
+/*
+ * ecgen, tool for generating Elliptic curve domain parameters
+ * Copyright (C) 2017 J08nY
+ */
+#ifndef ECGEN_INPUT_H
+#define ECGEN_INPUT_H
+
+#include "gp.h"
+
+typedef enum PARAM {
+ PARAM_PRIME,
+ PARAM_INT,
+ PARAM_SHORT
+} param_t;
+
+/**
+ *
+ * @param stream
+ * @param prompt
+ * @param bits
+ * @param delim
+ * @return
+ */
+GEN fread_prime(FILE *stream, const char *prompt, long bits, int delim);
+
+/**
+ *
+ * @param stream
+ * @param prompt
+ * @param bits
+ * @param delim
+ * @return
+ */
+GEN fread_int(FILE *stream, const char *prompt, long bits, int delim);
+
+/**
+ *
+ * @param stream
+ * @param prompt
+ * @param delim
+ * @return
+ */
+GEN fread_short(FILE *stream, const char *prompt, int delim);
+
+
+GEN fread_param(param_t param, FILE *stream, const char *prompt, long bits, int delim);
+
+GEN read_param(param_t param, const char *prompt, long bits, int delim);
+
+
+#endif //ECGEN_INPUT_H