Class AbstractReference

java.lang.Object
org.passay.support.AbstractReference
All Implemented Interfaces:
Reference
Direct Known Subclasses:
HistoricalReference, SourceReference

public abstract class AbstractReference extends Object implements Reference
Common password reference implementation.
  • Field Details

    • label

      private final String label
      Label to identify this password.
    • password

      private final UnicodeString password
      Reference password.
    • salt

      private final Salt salt
      Salt that was applied to reference password before digesting it.
  • Constructor Details

    • AbstractReference

      public AbstractReference(String label, CharSequence password)
      Creates a new abstract reference.
      Parameters:
      label - label for this password
      password - password string
    • AbstractReference

      public AbstractReference(String label, UnicodeString password)
      Creates a new abstract reference.
      Parameters:
      label - label for this password
      password - password string
    • AbstractReference

      public AbstractReference(String label, CharSequence password, Salt salt)
      Creates a new abstract reference.
      Parameters:
      label - label for this password
      password - password string
      salt - salt that was applied to password
    • AbstractReference

      public AbstractReference(String label, UnicodeString password, Salt salt)
      Creates a new abstract reference.
      Parameters:
      label - label for this password
      password - password string
      salt - salt that was applied to password
  • Method Details

    • getLabel

      public String getLabel()
      Returns the label.
      Returns:
      reference label
    • getPassword

      public UnicodeString getPassword()
      Description copied from interface: Reference
      Returns the password associated with this reference.
      Specified by:
      getPassword in interface Reference
      Returns:
      password string
    • getSalt

      public Salt getSalt()
      Description copied from interface: Reference
      Returns the salt that was applied to the reference password before digesting it.
      Specified by:
      getSalt in interface Reference
      Returns:
      salt the salt that was applied to the password, or null if no salt was applied
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clear

      public void clear()
      Description copied from interface: Reference
      Clears the memory of the underlying objects in this reference.
      Specified by:
      clear in interface Reference