Class OneTimePasswordSpec
- java.lang.Object
-
- org.wildfly.security.password.spec.OneTimePasswordSpec
-
- All Implemented Interfaces:
KeySpec
,PasswordSpec
public final class OneTimePasswordSpec extends Object implements PasswordSpec
APasswordSpec
for a one-time password as defined in RFC 2289.- Author:
- Farah Juma
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
hash
private String
seed
private int
sequenceNumber
-
Constructor Summary
Constructors Constructor Description OneTimePasswordSpec(byte[] hash, String seed, int sequenceNumber)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
byte[]
getHash()
Gets the hash.String
getSeed()
Gets the seed.int
getSequenceNumber()
Gets the sequence number.int
hashCode()
-
-
-
Field Detail
-
hash
private final byte[] hash
-
seed
private final String seed
-
sequenceNumber
private final int sequenceNumber
-
-
Constructor Detail
-
OneTimePasswordSpec
public OneTimePasswordSpec(byte[] hash, String seed, int sequenceNumber)
Construct a new instance.- Parameters:
hash
- the hash bytesseed
- the seedsequenceNumber
- the sequence number
-
-
Method Detail
-
getHash
public byte[] getHash()
Gets the hash.- Returns:
- the hash
-
getSeed
public String getSeed()
Gets the seed.- Returns:
- the seed
-
getSequenceNumber
public int getSequenceNumber()
Gets the sequence number.- Returns:
- the sequence number
-
-