MultiSum is a command line file hasher. Most of the other tools I've seen only focus on a single hash, or don't allow for parallel calculations. Some of my applications needed to collect the CRC, md5 and sha from a bunch of large files, which is painful if you have to do three reads. This program makes the most common hashes available in one tool and can calculate them all on a single pass through a given file; it uses one thread per selected hash to leverage multi-core CPU's. An interesting side effect is that if you run enough hashes in parallel you will be restricted by memory bandwidth, rather than CPU or IO.
In addition to computing many hashes in parallel, this tool also features Unicode and long path support, and can handle NTFS alternate data streams.
Output is completely customizable, so you can use multiSum to generate .sfv files, .md5 files, or anything else. Check the examples in the usage instructions. Supported hashes are: CRC32 (fast variant, outperforms the native windows function), MD5, SHA1, various SHA2, various SHA3, and Blake2B. KangarooTwelve might be coming in a future version.
A benchmarking mode is included to test hash speeds.
Version 4.6.2 or better of the .net framework is recommended. Get it from Microsoft.
No installation; just unpack and run.
multiSum.exe [-s:SUBDIRECTORY_FLAG] [-o:OUTPUT_FORMAT] FILES_AND_FOLDERS
File or directory names must be quoted if they contain spaces.
More than one file or folder can be listed, separated by spaces.
Must be either on (-s:1) or off (-s:0)
If any directories are specified, this flag determines if we hash files found in all subdirectories or only those immediately inside the specified directory.
Defaults is no subdirectory processing: -s:0
The format string defines how the programs output looks, as well as what hashes are calculated; the string must be quoted if it contains spaces.
For each file processed, the following replacements are made in the format string, and that string is output:
%FILEPATH% - the full path to the file including drive letter.
%FILENAME% - the file name.
%FILESIZE% - the file size.
%RELATIVEPATH% - the full path to the file with the CWD removed.
%CTIME% OR %MTIME% - the file's creation or modification time.
%RTIME% - the run time of the program.
"\n" OR "\t" - replaced with newline or tab characters.
%CRC32%, %MD5, %SHA1%, %SHA256%, %SHA384%, %SHA512%, %SHA3%, %SHA3_224%, %SHA3_256%, %SHA3_384%, %SHA3_512%, %BLAKE2B% ... are replaced with their respective hash values (in hex). (SHA3 is the NIST version, & %SHA3% yields the 256 bit version)
%.sfv% will be replaced with formats matching their respective file types.
Only the hashes specified in the format string will be calculated.
The default format is: "%FILENAME% %MD5%\n"
Arguments are processed left to right. The subdirectory flag and the output format string can be added as many times as desired to change the processing of files/directories to their right.
-h prints this help text
-b:0-3 sets the benchmark level:
-b:0 No extra output. (Default)
-b:1 Total run stats; reports the # of files hashed, the time & speed.
-b:2 File stats; also reports the time & speed for each file individually.
-b:3 Full stats; also runs a raw benchmark of every hash algo.
-i:1 Engages STDIN processing. On receiving this arg, the program enters into a loop processing standard input, it expects one file or folder name per line, unquoted. Files & folders will be processed as per options previously set (no options are processed after entering the STDIN loop). This mode is exited when the program sees -i:0 on its own line in STDIN.
This command runs the program on a single directory and prints the filenames & md5 hashes, one per line:
multisum.exe "-o:%MD5% %FILENAME%\n" c:\Text_files\
This is tab separated hashes, including subdirectories:
multisum.exe -o:%FILENAME%\t%SHA1%\t%SHA256\n -s:1 c:\windows
Version 1.2; 2019-08-28
- Added: %RELATIVEPATH% as an avalible replacement string.
- Fixed: some fixes in the %.md5% and %.sfv% replacements.
Version 1.1; 2019-08-21
- Added: support for accepting files and folders on STDIN. See the -i flag in the usage notes above.
- Added: support for BLAKE2B (only the 512 bit output version). Their c# codebase left a bit to be desired (started with 8 classes, ended up with 2), but I got there in the end. I'm using their fully-unrolled code for the core math; it bumps our executable size up by about 10K, but damn if it dosn't leave the SHAs in the dust.
- Added: better support for long paths, support for hashing NTFS alternate data streams (specify an ADS like so: "file.txt:someOtherStream"). Relative paths are still limited to 260 chars. If in doubt, Prepend \\?\ to long absolute paths.
%nullAlgo%, a dummy hash that just returns 0 in all cases. For testing IO speed.
- Changed: now targeting .net framework version to 4.6.2 to help with long path support.
Version 1.0; 2019-02-03
- Initial Release.
This software includes code or resources from the following sources:
This software is distributed as-is, without any representations or warranties of any kind.
The author of this software imposes no additional license terms or limits upon its use or redistribution.
Send to email@example.com
DocumentId: f3b1a22c3ed43443bf16cfde5adf4a54f6cd1645 EOF