1
21

Generate a SHA1

Use a command to generate a SHA1

To obtain the SHA1 digest of a file under Linux, use the command sha1sum:

$ sha1sum signmii.png
6efae7a28b0aad242eb70615103beff430ebbe14  signmii.png

Under Windows download and save in the folder C:\Windows the command sha1sum provided by GnuPG: sha1sum.exe.

Start a command processor - Start > All Programs > Accessories > Command Prompt. In the window of the command processor, type sha1sum and press Enter:

C:\>sha1sum
usage: sha1sum filenames

Go with the explorer in the folder containing the file whose SHA1 digest you want. In the window of the command processor, type sha1sum followed by a space without pressing Enter. Drop the file from the folder in the window of the command processor. The name of the file completes the command-line. Press Enter.

C:\>sha1sum "C:\Program Files\sha1sum\sha1sum.exe"
4a578ecd09a2d0c8431bdd8cf3d5c5f3ddcddfc9  C:\Program Files\sha1sum\sha1sum.exe

Click with the right button of the mouse in the window of the command processor. Click on Select in the menu. Select with the mouse the entire text of the SHA1 without the file name. Press Enter to copy the selection. Paste the SHA1 in a text file.

Under Mac OS X, start the Terminal application, type shasum followed by a space without pressing Enter, drop the file in the window of the Terminal, the name of the file comes to complete the command-line, press Enter.

$ shasum signmii.png
6efae7a28b0aad242eb70615103beff430ebbe14  signmii.png
SEE ALSO

Encode a signmii

Comments

Your comment:
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip help 2000

Enter a maximum of 2000 characters.
Improve the presentation of your text with the following formatting tags:
[p]paragraph[/p], [b]bold[/b], [i]italics[/i], [u]underline[/u], [s]strike[/s], [quote]citation[/quote], [pre]as is[/pre], [br]line break,
[url]http://www.izend.org[/url], [url=http://www.izend.org]site[/url], [email]izend@izend.org[/email], [email=izend@izend.org]izend[/email],
[code]commande[/code], [code=langage]code source en c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].