Class RandomPasswordEntropyFactory

java.lang.Object
org.passay.entropy.RandomPasswordEntropyFactory

public final class RandomPasswordEntropyFactory extends Object
Factory for creating RandomPasswordEntropy from password rules and password data.
  • Constructor Details

    • RandomPasswordEntropyFactory

      private RandomPasswordEntropyFactory()
      Private constructor for factory class.
  • Method Details

    • createEntropy

      public static RandomPasswordEntropy createEntropy(List<? extends Rule> passwordRules, PasswordData passwordData)
      Creates a new random password entropy.
      Parameters:
      passwordRules - to aid in entropy calculation
      passwordData - to aid in entropy calculation
      Returns:
      random password entropy
    • getUniqueCharacters

      private static Set<String> getUniqueCharacters(CharSequence characters)
      Returns the set of unique characters in the supplied string
      Parameters:
      characters - used to populate unique characters set with from the rule
      Returns:
      unique characters