Package com.nulabinc.zxcvbn
Class Strength
- java.lang.Object
-
- com.nulabinc.zxcvbn.Strength
-
public class Strength extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Strength()
Deprecated.This constructor is discouraged from use as it does not ensure all fields are initialized properly.Strength(java.lang.CharSequence password, double guesses, java.util.List<Match> sequence, long calcTime)
Constructs a Strength object with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
getCalcTime()
AttackTimes.CrackTimesDisplay
getCrackTimesDisplay()
AttackTimes.CrackTimeSeconds
getCrackTimeSeconds()
Feedback
getFeedback()
double
getGuesses()
double
getGuessesLog10()
java.lang.CharSequence
getPassword()
int
getScore()
java.util.List<Match>
getSequence()
void
setCalcTime(long calcTime)
Deprecated.Use constructor for initialization.void
setCrackTimesDisplay(AttackTimes.CrackTimesDisplay crackTimesDisplay)
Deprecated.Use constructor for initialization.void
setCrackTimeSeconds(AttackTimes.CrackTimeSeconds crackTimeSeconds)
Deprecated.Use constructor for initialization.void
setFeedback(Feedback feedback)
Deprecated.Use constructor for initialization.void
setGuesses(double guesses)
Deprecated.Use constructor for initialization.void
setGuessesLog10(double guessesLog10)
Deprecated.Use constructor for initialization.void
setPassword(java.lang.CharSequence password)
Deprecated.Use constructor for initialization.void
setScore(int score)
Deprecated.Use constructor for initialization.void
setSequence(java.util.List<Match> sequence)
Deprecated.Use constructor for initialization.void
wipe()
Attempts to wipe any sensitive content from the object.
-
-
-
Constructor Detail
-
Strength
@Deprecated public Strength()
Deprecated.This constructor is discouraged from use as it does not ensure all fields are initialized properly. Instead, use theStrength(CharSequence, double, List, long)
constructor to provide all necessary data.Default constructor.
-
Strength
public Strength(java.lang.CharSequence password, double guesses, java.util.List<Match> sequence, long calcTime)
Constructs a Strength object with the given parameters.- Parameters:
password
- The password for which strength is calculated.guesses
- Estimated number of guesses needed to crack the password.sequence
- A list of matching patterns found in the password.calcTime
- Time taken to calculate the password's strength.
-
-
Method Detail
-
getPassword
public java.lang.CharSequence getPassword()
-
setPassword
@Deprecated public void setPassword(java.lang.CharSequence password)
Deprecated.Use constructor for initialization. Modifying after instantiation is not recommended.Sets the password.
-
getGuesses
public double getGuesses()
-
setGuesses
@Deprecated public void setGuesses(double guesses)
Deprecated.Use constructor for initialization. Modifying after instantiation is not recommended.Sets the estimated number of guesses.
-
getGuessesLog10
public double getGuessesLog10()
-
setGuessesLog10
@Deprecated public void setGuessesLog10(double guessesLog10)
Deprecated.Use constructor for initialization. Modifying after instantiation is not recommended.Sets the logarithm (base 10) of the estimated number of guesses.
-
getCrackTimeSeconds
public AttackTimes.CrackTimeSeconds getCrackTimeSeconds()
-
setCrackTimeSeconds
@Deprecated public void setCrackTimeSeconds(AttackTimes.CrackTimeSeconds crackTimeSeconds)
Deprecated.Use constructor for initialization. Modifying after instantiation is not recommended.Sets the crack time in seconds.
-
getCrackTimesDisplay
public AttackTimes.CrackTimesDisplay getCrackTimesDisplay()
-
setCrackTimesDisplay
@Deprecated public void setCrackTimesDisplay(AttackTimes.CrackTimesDisplay crackTimesDisplay)
Deprecated.Use constructor for initialization. Modifying after instantiation is not recommended.Sets the display times for crack attempts.
-
getScore
public int getScore()
-
setScore
@Deprecated public void setScore(int score)
Deprecated.Use constructor for initialization. Modifying after instantiation is not recommended.Sets the score.
-
getFeedback
public Feedback getFeedback()
-
setFeedback
@Deprecated public void setFeedback(Feedback feedback)
Deprecated.Use constructor for initialization. Modifying after instantiation is not recommended.Sets the feedback.
-
getSequence
public java.util.List<Match> getSequence()
-
setSequence
@Deprecated public void setSequence(java.util.List<Match> sequence)
Deprecated.Use constructor for initialization. Modifying after instantiation is not recommended.Sets the sequence of matches.
-
getCalcTime
public long getCalcTime()
-
setCalcTime
@Deprecated public void setCalcTime(long calcTime)
Deprecated.Use constructor for initialization. Modifying after instantiation is not recommended.Sets the calculation time.
-
wipe
public void wipe()
Attempts to wipe any sensitive content from the object.
-
-