The answer to your question is yes. For any hash function, there is a maximum length X for which you will get unique strings. However, finding X could be very difficult. The idea is to run this program:
X= 0; For i = 0 onward For all strings of length i Compute the hash code of that string. If a collision is found, return X. X = i
The idea is to simply list long and long lines until you find a hash collision. In the end, you will have to, because in the end you will create more lines than there are possible hash outputs.
While waiting, assuming the hash function is actually quite random, you need to generate O (& radic; U) different lines before you find a collision, where U is the size of the space to which the hash functions are attached. For 256- bit hashes is 2 256 . This means that in practice the aforementioned program would never have stopped if the hash function had not been violated, but in theory this means that your number X exists.
Hope this helps!
templatetypedef
source share