Mounir IDRASSI (mounir@idrix.fr)

DirHash Windows 64-Bit Binary
DirHash Windows ARM64 Binary
DirHash Windows 32-Bit Binary
DirHash Source Code Zip
DirHash On GitHub
IDRIX Official DirHash page


PayPal Donation:
Donate to DirHash using PayPal

Bitcoin Donation:






DirHash is a Windows console program that computes the hash of a given directory content or a single file. It also supports creating SUM of files in a way similar to classical shasum program. Recursive Lexicographical order is used for browsing the directory hierarchy so that the computed hash can be seen as unique fingerprint of the target directory. Supported hashing algorithms are MD5, SHA-1, SHA-256, SHA-384, SHA-512, Streebog, Blake2s, Blake2 and Blake3.


DirHash can be invoked from the command like as follows:

DirHash.exe DirectoryOrFilePath [HashAlgo] [-t ResultFileName] [-progress] [-sum] [-sumRelativePath] [-verify FileName] [-threads] [-clip] [-lowercase] [-overwrite] [-quiet] [-nologo] [-nowait] [-skipError] [-hashnames [-stripnames]] [-exclude pattern1] [-exclude patter2] [-nofollow]

DirHash.exe -benchmark [HashAlgo | All] [-t ResultFileName] [-clip] [-overwrite] [-quiet] [-nologo] [-nowait]

Possible values for HashAlgo (not case sensitive):

  • MD5
  • SHA1
  • SHA256
  • SHA384
  • SHA512
  • Streebog
  • Blake2s
  • Blake2b
  • Blake3

If HashAlgo is not specified, Blake3 is used by default.

ResultFileName specifies an optional text file where the result will be appended.

if -benchmark is specified, program will perform speed benchmark of the selected hash algorithm

if -mscrypto specified, program will use Windows native implementation of hash algorithms (This is always enabled on Windows ARM platforms since OpenSSL is too slow on them).

if -sum is specified, program will output the hash of every file processed in a format similar to shasum.

if -sumRelativePath is specified (only when -sum is specified), the file paths are stored in the output file as relative to the input directory.

if -verify is specified, program will verify the hash of every file processed against its hash value present in the given checksum file.

if -threads is specified (only when -sum or -verify specified), multithreading will be used to accelerate hashing of files.

if -clip is specified, the hash result is copied to Windows clipboard. This switch is ignored when -sum is specified.

if -lowercase is specified, program outputs hash value(s) in lower case instead of upper case.

if -progress is specified, information about the progress of file hash operation is displayed.

if -overwrite is specified (only when -t is present), the output text file will be overwritten instead of having hash result appended to it.

if -quiet is specified, no text is displayed or written to the output file except the hash value.

if -nowait is specified, program will exit immediately after displaying the hash result. Otherwise, it prompts user to hit a key before it exits.

if -hashnames is specified, the case sensitive path of the files and directories will be included in the hash computation. Otherwise, only files content is used.

if -stripnames is specified (only when -hashnames also specified), only the the last path portion of files and directoroes is used for hash computation.

if -exclude is specified, it must be followed by a string indicating the file type that must be excluded from the hash computation. For example, to exclude .log files, you specify "-exclude *.log". This switch can be repeated many times in the command line to specify different file types to exclude.

if -skipError is specified, program will ignore any non-fatal errors and it will continue processing.

If -nologo is specified, program will not display the copyright message and version number on startup.

If -nofollow is specified, don't follow symbolic links, junction points or mount points, thus excluding them from hash computation.

DirHash can also be configured using a configuration file called DirHash.ini and which must be on the same folder as DirHash.exe.
When Sum=True is specified in DirHash.ini, it will have an effect only if -verify is not specified in the command line.
An example of DirHash.ini is shown below:



© COPYRIGHT 2021 ALL RIGHTS RESERVED Mounir IDRASSI (https://www.idrix.fr)


DirHash uses OpenSSL for its cryptographic operations on x86 and x64 platforms and the source comes with pre-built library files of OpenSSL 1.1.1g. On Windows ARM64 platforms (for example Microsoft Surface Pro X), DirHash uses Windows native implementation for hash algorithms since OpenSSL is not optimized for Windows ARM64 platform.
DirHash source code comes with a Microsoft Visual Studio 2019 solution file.

DirHash is licensed under 3-clause BSD license ("New BSD License").

The text of the license is available here