Package org.passay

Class DigestSourceRule

  • All Implemented Interfaces:
    Rule

    public class DigestSourceRule
    extends SourceRule
    Rule for determining if a password matches a digested password from a different source. Useful for when separate systems cannot have matching passwords. If no password reference has been set that matches the label on the rule, then passwords will meet this rule. See PasswordData.setPasswordReferences(org.passay.PasswordData.Reference...)
    Author:
    Middleware Services
    • Constructor Detail

      • DigestSourceRule

        public DigestSourceRule​(org.cryptacular.bean.HashBean<String> bean)
        Creates new digest source rule which operates on password references with the supplied label.
        Parameters:
        bean - encoding hash bean
    • Method Detail

      • setCharset

        public void setCharset​(Charset set)
        Sets the character set to use for undigested passwords.
        Parameters:
        set - to use for undigested passwords
      • matches

        protected boolean matches​(String password,
                                  PasswordData.Reference reference)
        Determines whether a digested password matches a reference value.
        Overrides:
        matches in class SourceRule
        Parameters:
        password - candidate clear text password.
        reference - reference digested password.
        Returns:
        true if passwords match, false otherwise.