No, that will not work. The hash similarity is not related to the similarity of the source lines. In fact, it is possible that two different lines have the same hash. All you can say for sure is that if the hashes are different, the lines were different.
[Edited in the light of the commentary, the probability of a collision is, of course, very real)
Edit for clarification:
If you only have a hash of the old string, then you cannot find the original value of this string. There is no algorithm that would tell you if the hashes of 2 different lines represented lines that were close, and even if that were, it would not help. Even if you find a string that hashes exactly matches your old string, you still donβt know if it was your original string, since any number of lines can produce the same value of the hash function. In fact, there are a huge number of lines that can create the same hash.
[Theoretically, this huge amount is virtually infinite, but on any real storage system you cannot generate an infinite number of rows. In any case, your chance of matching an unknown string using this approach is very thin, unless your hashes are large relative to the input string, and even then you will need to redirect the force through all possible strings]
source share