Class RandomPasswordEntropy

  • All Implemented Interfaces:
    Entropy

    public class RandomPasswordEntropy
    extends Object
    implements Entropy
    Entropy bits estimate defined in NIST SP-800-63-1 Randomly Selected Passwords. See PDF Publication A1. "Randomly Selected Passwords"
    Author:
    Middleware Services
    • Constructor Detail

      • RandomPasswordEntropy

        public RandomPasswordEntropy​(int alphaSize,
                                     int pwordSize)
        Creates a new random entropy estimate.
        Parameters:
        alphaSize - size of the alphabet used
        pwordSize - size of the password
    • Method Detail

      • estimate

        public double estimate()
        Returns the entropy bits of a randomly generated password given the size of the unique characters used (alphabetSize) and the size of the password. See PDF Publication A1. "Randomly Selected Passwords"
        Specified by:
        estimate in interface Entropy
        Returns:
        estimated entropy bits given password properties
      • log2

        public static double log2​(double number)
        Returns the log base 2 of a given number.
        Parameters:
        number - to get the log2 of
        Returns:
        log2 of number