Class Nbvcxz

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
    Result estimate​(java.lang.String password)
    Guess the entropy of a password with the configuration provided.
    Configuration getConfiguration()
    Gets the current configuration.
    static java.lang.Double getEntropyFromGuesses​(java.math.BigDecimal guesses)
    Gets the entropy from the number of guesses passed in.
    static java.math.BigDecimal getGuessesFromEntropy​(java.lang.Double entropy)
    Gets the number of guesses from the entropy passed in.
    static void main​(java.lang.String... args)
    Console application which will run with default configurations.
    void setConfiguration​(Configuration configuration)
    Sets the configuration.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Nbvcxz

      public Nbvcxz()
      Creates new instance with a default configuration.
    • Nbvcxz

      public Nbvcxz​(Configuration configuration)
      Creates a new instance with a custom configuration.
      Parameters:
      configuration - a Configuration to be used in all estimates.
  • 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 - a BigDecimal representing the number of guesses.
      Returns:
      entropy Double that 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 - a Double representing the number of guesses.
      Returns:
      guesses BigDecimal that 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

      public Configuration getConfiguration()
      Gets the current configuration.
      Returns:
      returns Configuration
    • setConfiguration

      public void setConfiguration​(Configuration configuration)
      Sets the configuration.
      Parameters:
      configuration - a Configuration to be used in all estimates.
    • estimate

      public Result estimate​(java.lang.String password)
      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.