Cadmeo

Hash Generator vs Hash Compare

Choose this if

Hash Generator

you need a digest from some text

Choose this if

Hash Compare

you already have two digests and need to know whether they are the same

How they compare

Hash Generator compared with Hash Compare, criterion by criterion
CriterionHash GeneratorHash Compare
InputText to hashTwo existing hex digests
OutputA digest in the algorithm you choseA verdict, the algorithm inferred from the length, and the first differing character
Tolerates a pasted checksum file lineNot relevant: it takes the content, not a digestYes. Surrounding whitespace and a trailing filename are stripped automaticallyBetter here
Case sensitivityOutputs lowercase hexCompares case-insensitively, since hex case carries no meaningBetter here
Detects an algorithm mismatchNo: you choose the algorithmYes. Different digest lengths mean different algorithms, which it reportsBetter here

Which is best for you

Generate when you need a digest that does not exist yet

Producing a fixture for a test, checking what SHA-256 gives for a known input, or demonstrating that changing one character changes half the output. Four algorithms are offered, and for anything security-related SHA-256 or above is the only sensible choice. SHA-1 is broken against deliberate collisions.

Compare when you have two digests already

A published checksum and one you computed. Comparing sixty-four hex characters by eye is genuinely unreliable, because people check the first few and the last few and miss a change in the middle. It also catches the failure that is not a corrupted file at all: two digests of different lengths came from different algorithms, so the comparison was never meaningful.

The recommendation

For verifying a download, skip both and use the file checksum calculator, which hashes the file and compares against a published value in one step. These two are for the cases that fall outside it. Generating a digest from text you have, and comparing two digests that arrived from elsewhere. If you do end up comparing by hand, use the compare tool rather than your eyes; that is the step where mistakes actually happen.

Frequently asked questions

Does the case of the hex letters matter?

No. Hexadecimal digits mean the same thing in either case, and tools disagree, sha256sum emits lowercase, several Windows utilities emit uppercase. The compare tool is deliberately case-insensitive for exactly that reason.

The two hashes are nearly identical. Is the file nearly right?

No. Hash functions avalanche: one changed bit in the input flips about half the output bits. Two digests differing in a single character came from genuinely different data. There is no such thing as a near match.

Both tools