Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
56 votes
Accepted

How to compare parts of files by hash?

Creating hashes to compare files makes sense if you compare one file against many, or when comparing many files against each other. It does not make sense when comparing two files only once: The ...
Konrad Rudolph's user avatar
52 votes
Accepted

How to take sha256sum of file and compare to check in one line?

I have downloaded an archive file and an accompanying checksum file. Here is how I verify that the hash of the downloaded archive matches the hash from the downloaded checksum file: echo "$(cat ...
peedee's user avatar
  • 652
36 votes

How to take sha256sum of file and compare to check in one line?

Example: echo "67574ee0039eaf4043a237e7c4b0eb432ca07ebf9c7b2dd0667e83bc3900b2cf kali-linux-2019.2-amd64.iso" | sha256sum -c In case you have the sha256sum file, you can directly use it: sha256sum -...
Akshay Anurag's user avatar
35 votes

Get the fingerprint of an existing SSH public key

In recent versions of ssh-keygen, one gets an RSA public key fingerprint on Unix-based systems with something like: $ ssh-keygen -l -E md5 -f ~/.ssh/id_rsa.pub where the path refers to a public key ...
Cris P's user avatar
  • 451
32 votes
Accepted

For websites, is your password's hash computed on the client or the server side?

I was wondering if passwords' inputs are "converted" locally on the client/web browser side or on the server side. Usually (with regular forms-based logins) everything is done on the server ...
grawity_u1686's user avatar
30 votes

How to take sha256sum of file and compare to check in one line?

You can see that sha256sum --check takes the output of a previous (regular) sha256sum run: it takes hashes and filenames via stdin, and compares them against actual files. So the obvious thing to do ...
grawity_u1686's user avatar
20 votes

Get the fingerprint of an existing SSH public key

Install openssh and openssl packages which contain the commands. # get the SHA256 and ascii art ssh-keygen -l -v -f /path/to/publickey # get the MD5 for private key openssl pkey -in /path/to/...
strobelight's user avatar
17 votes
Accepted

How to create md5 hash via Arch Linux commandline?

Simply echo it to md5sum. The first result will consider a newline character in the end of the string, prior to generating the hash. $ echo P@ssword1 | md5sum 0a43c426e3d6764fe1f3f7cbb3579eba - ...
Unfundednut's user avatar
  • 7,120
17 votes

How to generate MD5 hash value for multiple files in a folder using cmd

I know you asked specifically for cmd, but if you're using Windows 8.1 or higher, consider using Powershell instead: Get-FileHash -Algorithm MD5 -Path (Get-ChildItem "\\path\to\files\*.*" -Recurse) ...
Charles Burge's user avatar
17 votes

For websites, is your password's hash computed on the client or the server side?

Computing the hash yourself and sending it to the server would make the authentication process so much more secure No, accepting hashes instead of passwords would make the process much less secure. ...
Dmitry Grigoryev's user avatar
16 votes

Is there a built-in checksum utility on Windows 7?

I am adding this here only because I didn't see any fully working powershell examples, ready for copy-paste: C:\> powershell "Get-FileHash %systemroot%\system32\csrss.exe" Algorithm Hash ---...
Amit Naidu's user avatar
16 votes

Is there an Excel function to create a hash value?

I don't care very much about collisions, but needed a weak pseudorandomizer of rows based on a variable-length string field. Here's one insane solution that worked well: =MOD(MOD(MOD(MOD(MOD(IF(LEN(...
Anonymous Coward's user avatar
12 votes

How to compare parts of files by hash?

I am sorry I can't exactly try that, but this way will work dd if=yourfile.zip of=first100mb1.dat bs=100M count=1 dd if=yourotherfile.zip of=first100mb2.dat bs=100M count=1 This will get you the ...
davidbaumann's user avatar
  • 2,269
11 votes

How to create md5 hash via Arch Linux commandline?

None of the answers mention that with echo -n 'password' | …, you will write your password to persistent storage, namely your history. You can avoid this, depending on the shell, by prefixing the ...
Jonas Schäfer's user avatar
10 votes

How to generate MD5 hash value for multiple files in a folder using cmd

You could use the following script: for %%f in (*) do ( certutil -hashfile "%%f" MD5 )
testeaxeax's user avatar
  • 1,506
9 votes
Accepted

How can I generate an MD5 sum for a folder on Windows?

None of these quite did what I needed so I came up with this alternative... @echo off for /R . %%f in (*.*) do ( echo | set/p="%%f - " certutil -hashfile "%%f" MD5 | ...
Tirinoarim's user avatar
9 votes

Get the fingerprint of an existing SSH public key

The above works if you have access to the remote host. If not, to get the default sha256 hashes and Art from the remote host 'pi' (for example) you can do this: $ ssh-keyscan pi | ssh-keygen -lvf - #...
patrick's user avatar
  • 171
8 votes

Is there an Excel function to create a hash value?

Here's FNV-1a in 32-bits as a single excel formula, where cell A1 has the string you want to hash: =LET( Y, LAMBDA(G,a,b,m,res, IF(0<b, G( G, MOD(a, m) * 2, ...
Jason Kleban's user avatar
8 votes

Is there a built-in checksum utility on Windows 7?

A batch file based on pbarney's comment to the answer with the most upvotes: This copies the MD5 hash of whatever file is dragged onto the batch file to the clipboard: @ECHO OFF FOR /f "tokens=*" %%i ...
trapper_hag's user avatar
8 votes

How to create md5 hash via Arch Linux commandline?

Here is an example using openssl echo -n 'stack overflow' | openssl md5 (stdin)= 481b8423202598ecfb233c5fa68caf68 Openssl implement several different hashing algorithms, if you need a different one ...
OPSXCQ's user avatar
  • 189
8 votes

Is the ".sha256" file format formally defined somewhere? How should it be parsed?

A .sha256 file is a text file generated by the sha256sum program. The purpose of a .sha256 file is to enable one to check the integrity of files using the sha256sum program. Its content is not ...
dirdi's user avatar
  • 3,267
7 votes

sha1sum for a directory of directories

Another trick might be to use tar to hash the file contents & metadata: tar -cf - ./path/to/directory | sha1sum
kvz's user avatar
  • 179
7 votes

How to compare parts of files by hash?

Everybody seems to go the Unix/Linux route with this, but just comparing 2 files can easily be done with Windows standard commands: FC /B file file2 FC is present on every Windows NT version ever ...
Tonny's user avatar
  • 31.7k
7 votes

For websites, is your password's hash computed on the client or the server side?

Yes, when you enter a password in a website, it is transmitted to the server in plain text, and the script on the server can then do anything with it, even store it in plain text as well. In order to ...
LPChip's user avatar
  • 61.7k
6 votes

sha1sum for a directory of directories

INTRODUCTION A few years ago, I wrote and presented (in this very thread) a script that can check the hash signatures of all individual files in the current directory structure and output it as a ...
thebunnyrules's user avatar
6 votes

Safe way to verify that a Microsoft ISO has not been tampered with

Download ISOs and Hashes directly from Microsoft To download Windows 10 ISOs using Windows 10, you will need to change your browser's user agent. Without this step, Microsoft will force you to ...
idlehands's user avatar
6 votes

How can I generate an MD5 sum for a folder on Windows?

If you want to use a GUI, I can recommend Fsum Frontend. Fsum Frontend is a free and easy-to-use tool that allows to compute message digests, checksums and HMACs for files and text strings. It ...
ischeriad's user avatar
  • 1,070
6 votes

How to compare parts of files by hash?

You could just directly compare the files, with a binary / hex diff program like vbindiff. It quickly compares files up to 4GB on Linux & Windows. Looks something like this, only with the ...
Xen2050's user avatar
  • 14.1k
6 votes

How do I crack a double encrypted Hash

This composite hash has no benefit over plain bcrypt. It could be marginally weaker due to MD5 collisions, but I don't think one could actually exploit it to make this attack faster. Anyway, there's ...
gronostaj's user avatar
  • 57.2k

Only top scored, non community-wiki answers of a minimum length are eligible