-+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");
-+ }
-+
-+ src_fd = STDIN_FILENO;
-+ if (filename[0] != '-' || filename[1]) { /* not "-" */
-+ src_fd = open(filename, O_RDONLY);
-+ if (src_fd < 0) {
-+ bb_perror_msg("%s", filename);
-+ return NULL;
-+ }
-+ }