Class RawOneTimePassword
- java.lang.Object
-
- org.wildfly.security.password.interfaces.RawPassword
-
- org.wildfly.security.password.interfaces.RawOneTimePassword
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Key
,OneTimePassword
,OneWayPassword
,Password
class RawOneTimePassword extends RawPassword implements OneTimePassword
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
hash
private String
seed
private int
sequenceNumber
private static long
serialVersionUID
-
Fields inherited from interface org.wildfly.security.password.interfaces.OneTimePassword
ALGORITHM_OTP_MD5, ALGORITHM_OTP_SHA_256, ALGORITHM_OTP_SHA_384, ALGORITHM_OTP_SHA_512, ALGORITHM_OTP_SHA1, OTP_HASH_SIZE
-
-
Constructor Summary
Constructors Constructor Description RawOneTimePassword(String algorithm, byte[] hash, String seed, int sequenceNumber)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RawOneTimePassword
clone()
Creates and returns a copy of thisPassword
.boolean
equals(Object obj)
byte[]
getHash()
Get the hash represented by this password.String
getSeed()
Get the seed used to generate the hash.int
getSequenceNumber()
Get the sequence number used to generate the hash.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 java.security.Key
getAlgorithm, getEncoded, getFormat
-
Methods inherited from interface org.wildfly.security.password.interfaces.OneTimePassword
getParameterSpec, impliesParameters
-
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
-
hash
private final byte[] hash
-
seed
private final String seed
-
sequenceNumber
private final int sequenceNumber
-
-
Method Detail
-
getHash
public byte[] getHash()
Description copied from interface:OneTimePassword
Get the hash represented by this password.- Specified by:
getHash
in interfaceOneTimePassword
- Returns:
- the hash represented by this password
-
getSeed
public String getSeed()
Description copied from interface:OneTimePassword
Get the seed used to generate the hash.- Specified by:
getSeed
in interfaceOneTimePassword
- Returns:
- the seed used to generate the hash
-
getSequenceNumber
public int getSequenceNumber()
Description copied from interface:OneTimePassword
Get the sequence number used to generate the hash.- Specified by:
getSequenceNumber
in interfaceOneTimePassword
- Returns:
- the sequence number used to generate the hash
-
clone
public RawOneTimePassword clone()
Description copied from interface:Password
Creates and returns a copy of thisPassword
.- Specified by:
clone
in interfaceOneTimePassword
- 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
-
-