- All Known Implementing Classes:
BaseMatch,BruteForceMatch,DateMatch,DictionaryMatch,RepeatMatch,SeparatorMatch,SequenceMatch,SpacialMatch,YearMatch
public interface Match
Object to represent a match found by a
It should also be able to calculate a log^2 value of the guesses it would take to exhaust the problem space.
Additionally it should be able to return a string with details about the match to display to a user with relevant information pertaining to the type of
PasswordMatcher which contains the
portion of the password, where in the password the match was found (token), how many characters it is.
It should also be able to calculate a log^2 value of the guesses it would take to exhaust the problem space.
Additionally it should be able to return a string with details about the match to display to a user with relevant information pertaining to the type of
Match.- Author:
- Adam Brusselback
-
Method Summary
Modifier and Type Method Description doublecalculateEntropy()Calculate the entropy for the current matchdoublegetAverageEntropy()Get the average entropy per character of the current matchjava.lang.StringgetDetails()Returns details about this match in the form of a String to be printed directlyintgetEndIndex()Returns the end index of this part of the passwordintgetLength()Returns the length of this part of the passwordintgetStartIndex()Returns the start index of this part of the passwordjava.lang.StringgetToken()
-
Method Details
-
getToken
java.lang.String getToken()- Returns:
- the
Stringvalue of theMatch.
-
calculateEntropy
double calculateEntropy()Calculate the entropy for the current match- Returns:
- a
doublerepresenting the entropy of the currentMatch.
-
getAverageEntropy
double getAverageEntropy()Get the average entropy per character of the current match- Returns:
- a
doublerepresenting the average entropy per character of the currentMatch.
-
getStartIndex
int getStartIndex()Returns the start index of this part of the password- Returns:
- the
intstart index of thisMatch.
-
getEndIndex
int getEndIndex()Returns the end index of this part of the password- Returns:
- the
intend index of thisMatch.
-
getLength
int getLength()Returns the length of this part of the password- Returns:
- the
intlength of thisMatch.
-
getDetails
java.lang.String getDetails()Returns details about this match in the form of a String to be printed directly- Returns:
- all specific details about this
Matchin printable String format.
-