public class PasswordData extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PasswordData.AbstractReference
Common password reference implementation.
|
static class |
PasswordData.HistoricalReference
Reference to an historical password.
|
static class |
PasswordData.Origin
Enum to define the origin of a password.
|
static class |
PasswordData.PrefixSalt
A salt that is concatenated as a prefix to the password data.
|
static interface |
PasswordData.Reference
Reference to another password.
|
static interface |
PasswordData.Salt
Combines salt (additional external data) with a password
before applying a digest algorithm to them.
|
static class |
PasswordData.SourceReference
Reference to a source password.
|
static class |
PasswordData.SuffixSalt
A salt that is concatenated as a suffix to the password data.
|
Constructor and Description |
---|
PasswordData()
Default constructor.
|
PasswordData(String p)
Creates a new password data.
|
PasswordData(String p,
PasswordData.Origin o)
Creates a new password data.
|
PasswordData(String u,
String p)
Creates a new password data.
|
PasswordData(String u,
String p,
List<PasswordData.Reference> r)
Creates a new password data.
|
PasswordData(String u,
String p,
PasswordData.Origin o)
Creates a new password data.
|
Modifier and Type | Method and Description |
---|---|
PasswordData.Origin |
getOrigin()
Returns the origin.
|
String |
getPassword()
Returns the password.
|
List<PasswordData.Reference> |
getPasswordReferences()
Returns the password references.
|
<T extends PasswordData.Reference> |
getPasswordReferences(Class<T> type)
Returns the password references that match the supplied reference type.
|
String |
getUsername()
Returns the username.
|
static PasswordData |
newPasswordData(PasswordData data)
Returns a password data initialized with the supplied data.
|
void |
setOrigin(PasswordData.Origin o)
Sets the origin.
|
void |
setPassword(String p)
Sets the password.
|
void |
setPasswordReferences(List<PasswordData.Reference> l)
Sets the password references.
|
void |
setPasswordReferences(PasswordData.Reference... r)
Sets the password references.
|
void |
setUsername(String s)
Sets the username.
|
String |
toString() |
public PasswordData()
public PasswordData(String p)
PasswordData.Origin.User
by default.p
- passwordpublic PasswordData(String u, String p)
PasswordData.Origin.User
by default.u
- usernamep
- passwordpublic PasswordData(String p, PasswordData.Origin o)
p
- passwordo
- originpublic PasswordData(String u, String p, PasswordData.Origin o)
u
- usernamep
- passwordo
- originpublic PasswordData(String u, String p, List<PasswordData.Reference> r)
u
- usernamep
- passwordr
- referencespublic void setPassword(String p)
p
- passwordpublic String getPassword()
public void setOrigin(PasswordData.Origin o)
o
- originpublic PasswordData.Origin getOrigin()
public void setUsername(String s)
s
- usernamepublic String getUsername()
public List<PasswordData.Reference> getPasswordReferences()
public <T extends PasswordData.Reference> List<T> getPasswordReferences(Class<T> type)
T
- type of password referencetype
- of reference to matchpublic void setPasswordReferences(PasswordData.Reference... r)
r
- password referencespublic void setPasswordReferences(List<PasswordData.Reference> l)
l
- password referencespublic static PasswordData newPasswordData(PasswordData data)
data
- password data to read properties fromCopyright © 2003-2024 Virginia Tech. All Rights Reserved.