X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;ds=inline;f=src%2Fsha1.h;h=3f500b23b43b01e82fbeb7a1732e7f30e9af1fcb;hb=161e7cdd2c0d3b3c1025da452a3192d381297465;hp=c8fe87ff20800182b82cedda72a435785ce97ac3;hpb=9fb3aaca115429b0af2a623bf20bfceef74f047f;p=wimlib diff --git a/src/sha1.h b/src/sha1.h index c8fe87ff..3f500b23 100644 --- a/src/sha1.h +++ b/src/sha1.h @@ -4,7 +4,7 @@ #include "config.h" #include #include -#include "string.h" +#include #include "util.h" #define SHA1_HASH_SIZE 20 @@ -37,9 +37,9 @@ hashes_cmp(const u8 h1[SHA1_HASH_SIZE], } static inline void -print_hash(const u8 hash[SHA1_HASH_SIZE]) +print_hash(const u8 hash[SHA1_HASH_SIZE], FILE *out) { - print_byte_field(hash, SHA1_HASH_SIZE); + print_byte_field(hash, SHA1_HASH_SIZE, out); } static inline bool @@ -47,7 +47,7 @@ is_zero_hash(const u8 hash[SHA1_HASH_SIZE]) { if (hash) for (u8 i = 0; i < SHA1_HASH_SIZE / 4; i++) - if (((u32*)hash)[i]) + if (((const u32*)hash)[i]) return false; return true; } @@ -93,7 +93,4 @@ sha1_final(u8 hash[SHA1_HASH_SIZE], SHA_CTX *ctx); #endif /* !WITH_LIBCRYPTO */ -extern int -sha1sum(const mbchar *filename, u8 hash[SHA1_HASH_SIZE]); - #endif /* _WIMLIB_SHA1_H */