diff options
Diffstat (limited to 'src/io/input.h')
| -rw-r--r-- | src/io/input.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/io/input.h b/src/io/input.h new file mode 100644 index 0000000..f403661 --- /dev/null +++ b/src/io/input.h @@ -0,0 +1,59 @@ +/* + * ecgen, tool for generating Elliptic curve domain parameters + * Copyright (C) 2017 J08nY + */ +#ifndef ECGEN_INPUT_H +#define ECGEN_INPUT_H + +#include "math/random.h" + +typedef enum PARAM { + PARAM_PRIME, + PARAM_INT, + PARAM_SHORT, + PARAM_STRING +} 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_string(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); + +extern FILE *in; + +FILE *input_open(const char *input); + +void input_close(FILE *in); + +#endif // ECGEN_INPUT_H |
