|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.atp.auth.Auth
The Auth class is the class for challenge-response authentication.
Field Summary | |
static int |
FIRST_TURN
The turn of protocol : first turn. |
static int |
NO_TURNS
The turn of protocol : No turns. |
static int |
SECOND_TURN
The turn of protocol : second turn. |
Constructor Summary | |
protected |
Auth()
Default constructor creates a default message digest function. |
protected |
Auth(java.lang.String name)
Constructor creates a specified message digest function. |
Method Summary | |
protected void |
addBytes(byte[] bytes)
Adds byte sequence into digest function. |
abstract byte[] |
calculateResponse(int turn,
Challenge challenge)
Calculate response value for authentication. |
java.lang.String |
getDigestAlgorithm()
Returns the name of message digest function algorithm. |
protected byte[] |
getDigestValue()
Returns digest value by digest function. |
java.lang.String |
getFirstTurnIdentifier()
Gets the identifier of first turn individual. |
java.lang.String |
getSecondTurnIdentifier()
Gets the identifier of second turn individual. |
protected java.lang.String |
getTurnPad(int turn)
Returns the pad of turn individual. |
protected abstract byte[] |
hash(int turn,
Challenge challenge)
Returns hased value by digest function for the turn player. |
protected void |
resetDigest()
Resets message digest function. |
protected void |
setDigestAlgorithm(java.lang.String name)
Sets the name of message digest function algorithm. |
void |
setFirstTurnIdentifier(java.lang.String id)
Sets the identifier of first turn individual. |
void |
setSecondTurnIdentifier(java.lang.String id)
Sets the identifier of second turn individual. |
abstract boolean |
verify(int turn,
Challenge challenge,
byte[] response)
Verify response value for authentication. |
abstract boolean |
verify(int turn,
Challenge challenge,
ByteSequence response)
Verify response value for authentication. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NO_TURNS
public static final int FIRST_TURN
public static final int SECOND_TURN
Constructor Detail |
protected Auth()
protected Auth(java.lang.String name)
name
- the name of message digest function algorithmMethod Detail |
protected void addBytes(byte[] bytes)
bytes
- byte sequence to be addedpublic abstract byte[] calculateResponse(int turn, Challenge challenge) throws AuthenticationException
turn
- of individualchallenge
- a challengeAuthenticationException
- byte sequence for response is invalidpublic java.lang.String getDigestAlgorithm()
protected byte[] getDigestValue()
public java.lang.String getFirstTurnIdentifier()
public java.lang.String getSecondTurnIdentifier()
protected java.lang.String getTurnPad(int turn)
turn
- turn of infividualprotected abstract byte[] hash(int turn, Challenge challenge) throws AuthenticationException
turn
- turn of infividualchallenge
- a challengeAuthenticationException
- byte sequence to be hased is invalidprotected void resetDigest()
protected void setDigestAlgorithm(java.lang.String name)
name
- the name of message digest function algorithmpublic void setFirstTurnIdentifier(java.lang.String id)
id
- identifier of first turn individualpublic void setSecondTurnIdentifier(java.lang.String id)
id
- identifier of second turn individualpublic abstract boolean verify(int turn, Challenge challenge, byte[] response) throws AuthenticationException
turn
- of individualchallenge
- a challengeresponse
- response value for authenticationAuthenticationException
- byte sequence for response is invalidpublic abstract boolean verify(int turn, Challenge challenge, ByteSequence response) throws AuthenticationException
turn
- of individualchallenge
- a challengeresponse
- response value for authenticationAuthenticationException
- byte sequence for response is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |