Package org.passay.entropy
Class RandomPasswordEntropy
- java.lang.Object
-
- org.passay.entropy.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 Summary
Constructors Constructor Description RandomPasswordEntropy(int alphaSize, int pwordSize)
Creates a new random entropy estimate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.static double
log2(double number)
Returns the log base 2 of a given number.
-
-
-
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"
-
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
-
-