Package com.nulabinc.zxcvbn.matchers
Class SequenceMatcher
- java.lang.Object
-
- com.nulabinc.zxcvbn.matchers.BaseMatcher
-
- com.nulabinc.zxcvbn.matchers.SequenceMatcher
-
- All Implemented Interfaces:
Matcher
public class SequenceMatcher extends BaseMatcher
-
-
Constructor Summary
Constructors Constructor Description SequenceMatcher(Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Match>
execute(java.lang.CharSequence password)
Identifies sequence by looking for repeated differences in unicode codepoint.-
Methods inherited from class com.nulabinc.zxcvbn.matchers.BaseMatcher
getContext, sorted
-
-
-
-
Constructor Detail
-
SequenceMatcher
public SequenceMatcher(Context context)
-
-
Method Detail
-
execute
public java.util.List<Match> execute(java.lang.CharSequence password)
Identifies sequence by looking for repeated differences in unicode codepoint. this allows skipping, such as 9753, and also matches some extended unicode sequences such as Greek and Cyrillic alphabets.for example, consider the input 'abcdb975zy'
password: a b c d b 9 7 5 z y index: 0 1 2 3 4 5 6 7 8 9 delta: 1 1 1 -2 -41 -2 -2 69 1
expected result: [(i, j, delta), ...] = [(0, 3, 1), (5, 7, -2), (8, 9, 1)]
- Parameters:
password
- the password to analyze for patterns.- Returns:
- a list of matches identifying patterns found within the password.
-
-