Package org.passay
Class PasswordData.AbstractReference
- java.lang.Object
-
- org.passay.PasswordData.AbstractReference
-
- All Implemented Interfaces:
PasswordData.Reference
- Direct Known Subclasses:
PasswordData.HistoricalReference
,PasswordData.SourceReference
- Enclosing class:
- PasswordData
public abstract static class PasswordData.AbstractReference extends Object implements PasswordData.Reference
Common password reference implementation.
-
-
Constructor Summary
Constructors Constructor Description AbstractReference(String lbl, String pass)
Creates a new abstract reference.AbstractReference(String lbl, String pass, PasswordData.Salt slt)
Creates a new abstract reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLabel()
Returns the label.String
getPassword()
Returns the password associated with this reference.PasswordData.Salt
getSalt()
Returns the salt that was applied to the reference password before digesting it.String
toString()
-
-
-
Constructor Detail
-
AbstractReference
public AbstractReference(String lbl, String pass, PasswordData.Salt slt)
Creates a new abstract reference.- Parameters:
lbl
- label for this passwordpass
- password stringslt
- salt that was applied to password
-
-
Method Detail
-
getLabel
public String getLabel()
Returns the label.- Returns:
- reference label
-
getPassword
public String getPassword()
Description copied from interface:PasswordData.Reference
Returns the password associated with this reference.- Specified by:
getPassword
in interfacePasswordData.Reference
- Returns:
- password string
-
getSalt
public PasswordData.Salt getSalt()
Description copied from interface:PasswordData.Reference
Returns the salt that was applied to the reference password before digesting it.- Specified by:
getSalt
in interfacePasswordData.Reference
- Returns:
- salt the salt that was applied to the password, or null if no salt was applied
-
-