Class RandomPasswordEntropy

  • All Implemented Interfaces:

    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"
    Middleware Services
    • Constructor Detail

      • RandomPasswordEntropy

        public RandomPasswordEntropy​(int alphaSize,
                                     int pwordSize)
        Creates a new random entropy estimate.
        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
        estimated entropy bits given password properties
      • log2

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