X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fsha1.c;h=ca1ad0eb6c5fac90c95da6e7a86ef13f1e0a091e;hb=687d07120a2d543f02bffe88efdf9583fbab1459;hp=ce3d9b6d155ee911018242a9b6f9e73b88f302e9;hpb=60b8f54df8fed44136bdc8ec615ee62703d87b69;p=wimlib diff --git a/src/sha1.c b/src/sha1.c index ce3d9b6d..ca1ad0eb 100644 --- a/src/sha1.c +++ b/src/sha1.c @@ -4,8 +4,8 @@ * Parts of this file are based on public domain code written by Steve Reid. */ -/* - * Copyright (C) 2012 Eric Biggers +/* + * Copyright (C) 2012, 2013 Eric Biggers * * This file is part of wimlib, a library for working with WIM files. * @@ -69,7 +69,7 @@ void sha1_update(SHA_CTX *context, const u8 data[], size_t len) #include void ssse3_not_found() { - fprintf(stderr, + fprintf(stderr, "Cannot calculate SHA1 message digest: CPU does not support SSSE3\n" "instructions! Recompile wimlib without the --enable-ssse3-sha1 flag\n" "to use wimlib on this CPU.\n"); @@ -222,10 +222,10 @@ static int sha1_stream(FILE *fp, u8 md[SHA1_HASH_SIZE]) } -/* Calculates the SHA1 message digest given the name of a file. @md must point - * to a buffer of length 20 bytes into which the message digest is written. - */ -int sha1sum(const char *filename, u8 md[SHA1_HASH_SIZE]) +/* Calculates the SHA1 message digest of a file. @md must point to a buffer of + * length 20 bytes into which the message digest is written. */ +int +sha1sum(const mbchar *filename, u8 md[SHA1_HASH_SIZE]) { FILE *fp; int ret;