-1
$\begingroup$

If I hash the word SOUND, where the word SOUND appears five times inside the file, will each of the five instances of SOUND appear as identical hash values?

$\endgroup$

closed as unclear what you're asking by yyyyyyy, forest, Maeher, Maarten Bodewes Feb 11 at 1:12

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    $\begingroup$ Rather than waiting for someone else to answer, you could always try it and see what happens $\endgroup$ – Ella Rose Feb 7 at 19:06
  • $\begingroup$ This will be the first time I have personally attempted it. Not sure how to test. $\endgroup$ – user65722 Feb 7 at 19:07
  • 1
    $\begingroup$ There are plenty of web sites that will do this for you (obviously you would not use them if what you are hashing is supposed to remain secret, but that clearly doesn't apply here) $\endgroup$ – Ella Rose Feb 7 at 19:10
  • 2
    $\begingroup$ The question is ambiguous. We do not know if you hash the file, which gives a single hash; or several times the same thing, which will give several times the same hash. $\endgroup$ – fgrieu Feb 7 at 19:29
  • $\begingroup$ Or if you are hashing the hash of a hash ... etc 5 times $\endgroup$ – Ella Rose Feb 7 at 19:31
1
$\begingroup$

Hash functions are operating from $H:\{0,1\}^* \to \{0,1\}^n$ where $n$ is the output size. So, if you hash a text file you will get only $n$-bit result.

Cryptographic Hash functions are deterministic same input same output and random functions in a sense the output is unpredictable. We don't expect a pattern in the output.

This output from an online SHA-1 for 5-times SOUND

 fd8b11a88ea2ef299d4fec6608d4c48a9b6f535e

As you see, there is no pattern. And don't expect to see a pattern, too.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.