If it is possible to locate a shorter password which hashes for the same value as a longer password, the hashing algorithm is broken. $endgroup$When the keys are strings (or integers), a trie might be another option. A trie is really a tree, but indexed in another way from a look for tree: you create The crucial element in binary, and go remaining … Read More