-+uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
-+{
-+ int src_fd, hash_len;
-+ RESERVE_CONFIG_UBUFFER(hash_buf, 20);
-+ uint8_t *hash_value = NULL;
-+
-+ if(ENABLE_MD5SUM && hash_algo==HASH_MD5) {
-+ hash_len = 16;
-+ } else if(ENABLE_SHA1SUM && hash_algo==HASH_SHA1) {
-+ hash_len = 20;
-+ } else {
-+ bb_error_msg_and_die("algotithm not supported");
-+ }
-+
-+ if(strcmp(filename, "-") == 0) {
-+ src_fd = STDIN_FILENO;
-+ } else if(0 > (src_fd = open(filename, O_RDONLY))) {
-+ bb_perror_msg("%s", filename);
-+ return NULL;
-+ }