DI Management Home > Utilities > Generate file digest value

Generate file digest value

The Windows program digestvalue.exe is a freeware command-line program that computes the digest value in base64 encoding for a file or list of files. The base64-encoded digest value is suitable for inserting in the <DigestValue> node of an XML-DSIG document.

New 2022-02-07: added SHA-224, SHA-384 and SHA-512 digest algorithms.

For example, to compute the digest value of the file abc.txt using the default algorithm SHA-1:

> digestvalue abc.txt

If you want the more traditional sha1sum and md5sum freeware programs that generate the value in hexadecimal, see our Generate file checksums page.


> digestvalue -h
Usage: digestvalue [[-1]|-2|-3|-4|-5|-m] [-x] [-h|v] [FILE]...
Compute the digest value for each FILE.
With no file, read standard input.
 -1    use SHA-1 digest algorithm (default)
 -2    use SHA-256 digest algorithm (default=SHA-1)
 -3    use SHA-384 digest algorithm (default=SHA-1)
 -4    use SHA-224 digest algorithm (default=SHA-1)
 -5    use SHA-512 digest algorithm (default=SHA-1)
 -m    use MD5 digest algorithm (default=SHA-1)
 -x    display digest in hex encoding (default=base64)
 -h    display this help and exit
 -v    output version information and exit

More examples

Specify files using a wildcard.
> digestvalue *.txt
98O8HYCOBHMq32eZZczDTKeuNEE=  123-9.txt
qZk+NkcGgWq6PiVxeFDCbJzQ2J0=  abc.txt
Kq5sNclPz7QV2+lfQIuc6R7oRu0=  hello.txt
iKW4Z8PRECB3huZlI80eSkhNppc=  hellon.txt
Compute the SHA-256 digest and display in hexadecimal.
> digestvalue -2x abc.txt
Iterate through digest algorithms (SHA-1, SHA-224, SHA-256, ..., SHA-512)
> for %a in (1,4,2,3,5) do @digestvalue -x -%a abc.txt
Check these against Test vectors for SHA-1, SHA-2 and SHA-3.

Enter a string value from the command line using "SET /p=<string>". Note no space between the end of the string and the '|'.

> echo | set /p=abc| digestvalue -x -2

> echo | set /p=hello world| digestvalue -x -2


  1. Binaries: digestvalue-1.1.0.zip (69 kB) [sha1=a8f3401647c53690b901d5180cd4e2575dfba092]. The latest version is 1.1.0 compiled on 2022-02-07.


To install, just copy the file digestvalue.exe to a folder on your Windows PATH, for example C:\Windows. You may need administrator permissions to copy the file. We recommend you set up a C:\Bin directory for files like this.

Contact us

To report a bug, comment on this page or to contact us, please send us a message.

This page first published 11 March 2017. Last updated 3 November 2023.