diff options
author | Glenn L McGrath | 2003-11-10 04:33:55 +0000 |
---|---|---|
committer | Glenn L McGrath | 2003-11-10 04:33:55 +0000 |
commit | d2a897aab084b433231aab5f6908a79cba67dc5d (patch) | |
tree | 8a0b113bd44bc2be639e070b50668e4ad69091f2 /include | |
parent | 0bdf41ad7e81451bc829365e0d9a676dda8145f9 (diff) | |
download | busybox-d2a897aab084b433231aab5f6908a79cba67dc5d.zip busybox-d2a897aab084b433231aab5f6908a79cba67dc5d.tar.gz |
Merge common parts of sha1sum and md5sum, which is everything except the
algorithms.
Move algorithms to hash_fd and make them available via a common
function.
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index 945dc95..21ea316 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -473,4 +473,10 @@ extern void vfork_daemon_rexec(int argc, char **argv, char *foreground_opt); extern void get_terminal_width_height(int fd, int *width, int *height); extern unsigned long get_ug_id(const char *s, long (*my_getxxnam)(const char *)); extern void xregcomp(regex_t *preg, const char *regex, int cflags); + +#define HASH_SHA1 1 +#define HASH_MD5 2 +extern int hash_fd(int fd, const off_t size, const uint8_t hash_algo, uint8_t *hashval); + + #endif /* __LIBCONFIG_H__ */ |