Class RawDigestPassword
- java.lang.Object
-
- org.wildfly.security.password.interfaces.RawPassword
-
- org.wildfly.security.password.interfaces.RawDigestPassword
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Key
,DigestPassword
,OneWayPassword
,Password
class RawDigestPassword extends RawPassword implements DigestPassword
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
digest
private String
realm
private static long
serialVersionUID
private String
username
-
Fields inherited from interface org.wildfly.security.password.interfaces.DigestPassword
ALGORITHM_DIGEST_MD5, ALGORITHM_DIGEST_SHA, ALGORITHM_DIGEST_SHA_256, ALGORITHM_DIGEST_SHA_384, ALGORITHM_DIGEST_SHA_512, ALGORITHM_DIGEST_SHA_512_256
-
-
Constructor Summary
Constructors Constructor Description RawDigestPassword(String algorithm, String username, String realm, byte[] digest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RawDigestPassword
clone()
Creates and returns a copy of thisPassword
.boolean
equals(Object obj)
byte[]
getDigest()
Get the digest represented by thisPassword
.String
getRealm()
Get the realm thisPassword
is associated with.String
getUsername()
Get the username thisPassword
is associated with.int
hashCode()
-
Methods inherited from class org.wildfly.security.password.interfaces.RawPassword
getAlgorithm, getEncoded, getFormat
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.password.interfaces.DigestPassword
getParameterSpec, impliesParameters
-
Methods inherited from interface java.security.Key
getAlgorithm, getEncoded, getFormat
-
Methods inherited from interface org.wildfly.security.password.Password
castAndApply, castAndApply, castAs, castAs
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
username
private final String username
-
realm
private final String realm
-
digest
private final byte[] digest
-
-
Method Detail
-
getUsername
public String getUsername()
Description copied from interface:DigestPassword
Get the username thisPassword
is associated with.Generally a
Password
should not need to know this information but this is an integral part of how the representation of thisPassword
is created.- Specified by:
getUsername
in interfaceDigestPassword
- Returns:
- the username this
Password
is associated with
-
getRealm
public String getRealm()
Description copied from interface:DigestPassword
Get the realm thisPassword
is associated with.Note: This is independent of the name of the realm used to obtain the
Password
representation, this is the value used to generate the digest.- Specified by:
getRealm
in interfaceDigestPassword
- Returns:
- the realm this
Password
is associated with
-
getDigest
public byte[] getDigest()
Description copied from interface:DigestPassword
Get the digest represented by thisPassword
.- Specified by:
getDigest
in interfaceDigestPassword
- Returns:
- the digest represented by this
Password
-
clone
public RawDigestPassword clone()
Description copied from interface:Password
Creates and returns a copy of thisPassword
.- Specified by:
clone
in interfaceDigestPassword
- Specified by:
clone
in interfaceOneWayPassword
- Specified by:
clone
in interfacePassword
- Specified by:
clone
in classRawPassword
- Returns:
- a copy of this
Password
.
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classRawPassword
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in classRawPassword
-
-