Levenshtein? #182
-
Hello, So i understand levenshtein is a string comparison algorithm of sorts, but not really sure how it benefits zxcvbn at all. This could perhaps be a good addition to the docs for all the uninformed (such as myself) out there. In short; Why would I enable a feature if I have no clue what it does in the context of zxcvbn. Any insight is appreciated!
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Seems reasonable and i will add it to the docs. The levenshtein implementation compares two strings with each other and gives a the number of differences back. For example In the context of zxcvbn it will improve the algorithm too find entries in a dictionary as it not only tries to find equals matches like |
Beta Was this translation helpful? Give feedback.
Seems reasonable and i will add it to the docs.
The levenshtein implementation compares two strings with each other and gives a the number of differences back. For example
password
vspasswrd
. With this example we got a levenshtein distance of 1 which basically means there is a difference of 1 character between both string.This is not limited to missing characters. It also checks for additional or different characters like
passwword
orpassworf
.In the context of zxcvbn it will improve the algorithm too find entries in a dictionary as it not only tries to find equals matches like
password
===password
but also string with a difference of 2, in the default configuration.This means with t…