aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-10-21 16:22:41 +0200
committerMattias Andrée <maandree@kth.se>2020-10-21 16:22:41 +0200
commit1f16c1b20cc63bcf2adb91ab89098252ddcf005e (patch)
tree29f7545920cb88f015348b72db8c852bd5ffafc1 /common.h
parentAdd -z (diff)
downloadsha3sum-1f16c1b20cc63bcf2adb91ab89098252ddcf005e.tar.gz
sha3sum-1f16c1b20cc63bcf2adb91ab89098252ddcf005e.tar.bz2
sha3sum-1f16c1b20cc63bcf2adb91ab89098252ddcf005e.tar.xz
Add sha3sum for compatibility with busybox (-w and -s are however not support)
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--common.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/common.h b/common.h
index f116035..66cc429 100644
--- a/common.h
+++ b/common.h
@@ -7,7 +7,7 @@
struct libkeccak_generalised_spec spec;\
libkeccak_generalised_spec_initialise(&spec);\
CONFIGURATION;\
- return run(argc, argv, &spec, SUFFIX);\
+ return run(argc, argv, &spec, SUFFIX, 0);\
}
#define KECCAK_MAIN(N)\
COMMON_MAIN(libkeccak_spec_sha3((struct libkeccak_spec *)&spec, N), "")
@@ -47,6 +47,7 @@ enum representation {
* @param argv The second argument from `main`
* @param gspec The default algorithm parameters
* @param suffix Message suffix
+ * @param with_a Whether the -a option should be recognised (but ignored)
* @return An appropriate exit value
*/
-int run(int argc, char *argv[], struct libkeccak_generalised_spec *restrict gspec, const char *restrict suffix);
+int run(int argc, char *argv[], struct libkeccak_generalised_spec *restrict gspec, const char *restrict suffix, int with_a);