diff options
author | Matt Johnston <matt@ucc.asn.au> | 2020-10-15 19:55:15 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2020-10-15 19:55:15 +0800 |
commit | 0e3e8db5bfca0c579be55e7580a46c593c1384be (patch) | |
tree | 2b1a718f633fb95c1f2d689a591cf9e8642697f3 /libtomcrypt/src/hashes | |
parent | 78e17f6ee9a944430da3e517ee1fe384fd6b275b (diff) | |
parent | 17873e8c922eded2cec86184673a6d110df6403f (diff) |
merge from main
--HG--
branch : fuzz
Diffstat (limited to 'libtomcrypt/src/hashes')
-rw-r--r-- | libtomcrypt/src/hashes/helper/hash_file.c | 4 | ||||
-rw-r--r-- | libtomcrypt/src/hashes/helper/hash_filehandle.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libtomcrypt/src/hashes/helper/hash_file.c b/libtomcrypt/src/hashes/helper/hash_file.c index b3e79d9..0b96eae 100644 --- a/libtomcrypt/src/hashes/helper/hash_file.c +++ b/libtomcrypt/src/hashes/helper/hash_file.c @@ -9,7 +9,7 @@ #include "tomcrypt.h" #ifndef LTC_NO_FILE -/** +/** @file hash_file.c Hash a file, Tom St Denis */ @@ -34,7 +34,7 @@ int hash_file(int hash, const char *fname, unsigned char *out, unsigned long *ou } in = fopen(fname, "rb"); - if (in == NULL) { + if (in == NULL) { return CRYPT_FILE_NOTFOUND; } diff --git a/libtomcrypt/src/hashes/helper/hash_filehandle.c b/libtomcrypt/src/hashes/helper/hash_filehandle.c index 1d72f25..0e4d7a6 100644 --- a/libtomcrypt/src/hashes/helper/hash_filehandle.c +++ b/libtomcrypt/src/hashes/helper/hash_filehandle.c @@ -14,13 +14,13 @@ Hash open files, Tom St Denis */ -/** - Hash data from an open file handle. +/** + Hash data from an open file handle. @param hash The index of the hash you want to use @param in The FILE* handle of the file you want to hash @param out [out] The destination of the digest @param outlen [in/out] The max size and resulting size of the digest - @result CRYPT_OK if successful + @result CRYPT_OK if successful */ int hash_filehandle(int hash, FILE *in, unsigned char *out, unsigned long *outlen) { @@ -57,8 +57,8 @@ int hash_filehandle(int hash, FILE *in, unsigned char *out, unsigned long *outle } } while (x == LTC_FILE_READ_BUFSIZE); if ((err = hash_descriptor[hash].done(&md, out)) == CRYPT_OK) { - *outlen = hash_descriptor[hash].hashsize; - } + *outlen = hash_descriptor[hash].hashsize; + } LBL_CLEANBUF: zeromem(buf, LTC_FILE_READ_BUFSIZE); |