3 ms·
It is definitely possible to do that. When the user submits a password to save, it hashes it and saves it to the database. At the same time, it calculates x num
by apocalyptic0n3 7y ago
It is definitely possible to do that. When the user submits a password to save, it hashes it and saves it to the database. At the same time, it calculates x number of variations of the passwords, hashes those, and saves those to the database as well. The next time you go to update your password, the hash gets compared against the actual previous hash as well as the x number of hashed variations and if any match, it gets rejected.
Not super efficient and in most cases, probably not worth the effort. But completely doable to do.
- StavrosK 7y agoHow many variations will you store? It's very easy to calculate the Levenshtein distance on plaintext data, but basically impossible to enumerate all the variants and hash them.