You should ofc 'salt' users passwords ahead of hashing them to avoid having the ability to Recuperate the original password from the hash. $endgroup$Once the keys are strings (or integers), a trie can be another option. A trie is really a tree, but indexed in a different way from a lookup tree: you produce the key in binary, and go remaining for a