aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-01-16 21:41:44 +0100
committerMattias Andrée <maandree@kth.se>2022-01-16 21:42:39 +0100
commitfcc5eb9f87a476115cc742bf45056ccbbc830057 (patch)
tree4180fc846779d3e7e90d36122392f48193b88659 /common.h
parentFirst commit (diff)
downloadblakesum-fcc5eb9f87a476115cc742bf45056ccbbc830057.tar.gz
blakesum-fcc5eb9f87a476115cc742bf45056ccbbc830057.tar.bz2
blakesum-fcc5eb9f87a476115cc742bf45056ccbbc830057.tar.xz
m + add b2sum
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/common.h b/common.h
index b0cbd63..96998a8 100644
--- a/common.h
+++ b/common.h
@@ -12,3 +12,13 @@
#include <libblake.h>
#include "arg.h"
+
+/* common.c */
+void *erealloc(void *ptr, size_t n);
+void *emalloc(size_t n);
+int open_file(const char *path, int *closep);
+int check_and_print(const char *path, size_t hashlen, int decode_hex, char newline);
+int hash_and_print(const char *path, size_t hashlen, int decode_hex, char newline, int output_case);
+
+/* *sum.c */
+int hash_fd(int fd, const char *fname, int decode_hex, unsigned char hash[]);