SignTool Error: ‘No File Digest Algorithm Specified. Please Specify the Digest Algorithm with the /fd Flag’

Are you frustrated by this SignTool error? Shake it off and learn how to fix it by following our quick, practical tips
“SignTool Error: No File Digest Algorithm Specified. Please Specify the Digest Algorithm with the /fd Flag”

Microsoft’s SignTool.exe is an easy-to-use command line tool used to sign all sorts of files compatible with the Windows operating system (OS). But as you can see from the error above, this doesn’t mean your code signing operations will be always mistake-free.
So, let’s explore what the following SignTool.exe error message means and learn how to avoid it.
Editor’s Note: This article is one in a series of pieces we will publish over the next few weeks that aim to help resolve code signing-related errors for SignTool, Jarsigner, Electron, and Windows.
What ‘SignTool Error: No File Digest Algorithm Specified. Please Specify the Digest Algorithm with the /fd Flag’ Means
This SignTool code sign error is probably one of the most straightforward ones you can hope to see. It means exactly what the name implies: your script doesn’t mention the functional dependency (in this case, the algorithm that should be used to add the digital signature to your code).
Possible Cause(s) of This ‘No File Digest Algorithm Specified’ Error
You forgot to add the /fd tag to your signing script, followed by your chosen hashing function, to specify the hashing algorithm in your code signing command.
How to Fix this SignTool Missing File Digest Error
Add /fd followed by a secure signing algorithm (i.e., SHA256) to the SignTool signing command. Ensure it precedes your file location and name, as shown in the example below:

Platform(s)/Systems Affected
SignTool.exe (Windows, Visual Studio Developer Command Prompt, Visual Studio Developer PowerShell).