java.lang.Object
me.gosimple.nbvcxz.Nbvcxz
public class Nbvcxz
extends java.lang.Object
This class allows you to do estimates on passwords. It can be instantiated and configured once, and the same
instance should be used for subsequent password estimates.
- Author:
- Adam Brusselback
-
Constructor Summary
Constructors Constructor Description Nbvcxz()Creates new instance with a default configuration.Nbvcxz(Configuration configuration)Creates a new instance with a custom configuration. -
Method Summary
Modifier and Type Method Description Resultestimate(java.lang.String password)Guess the entropy of a password with the configuration provided.ConfigurationgetConfiguration()Gets the current configuration.static java.lang.DoublegetEntropyFromGuesses(java.math.BigDecimal guesses)Gets the entropy from the number of guesses passed in.static java.math.BigDecimalgetGuessesFromEntropy(java.lang.Double entropy)Gets the number of guesses from the entropy passed in.static voidmain(java.lang.String... args)Console application which will run with default configurations.voidsetConfiguration(Configuration configuration)Sets the configuration.
-
Constructor Details
-
Method Details
-
getEntropyFromGuesses
public static java.lang.Double getEntropyFromGuesses(java.math.BigDecimal guesses)Gets the entropy from the number of guesses passed in.- Parameters:
guesses- aBigDecimalrepresenting the number of guesses.- Returns:
- entropy
Doublethat is calculated based on the guesses.
-
getGuessesFromEntropy
public static java.math.BigDecimal getGuessesFromEntropy(java.lang.Double entropy)Gets the number of guesses from the entropy passed in.- Parameters:
entropy- aDoublerepresenting the number of guesses.- Returns:
- guesses
BigDecimalthat is calculated based on the entropy.
-
main
public static void main(java.lang.String... args)Console application which will run with default configurations.- Parameters:
args- arguments which are ignored!
-
getConfiguration
Gets the current configuration.- Returns:
- returns
Configuration
-
setConfiguration
Sets the configuration.- Parameters:
configuration- aConfigurationto be used in all estimates.
-
estimate
Guess the entropy of a password with the configuration provided.- Parameters:
password- The password you would like to attempt to estimate on.- Returns:
- Result object that contains info about the password.
-