|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.atp.auth.Auth | +--com.ibm.atp.auth.AuthByDigest
The AuthByDigest class is the class for challenge-response authentication by message digest.
Fields inherited from class com.ibm.atp.auth.Auth |
FIRST_TURN, NO_TURNS, SECOND_TURN |
Constructor Summary | |
protected |
AuthByDigest()
Default constructor creates a default message digest function. |
|
AuthByDigest(SharedSecret secret)
Constructor creates a specified message digest function. |
protected |
AuthByDigest(java.lang.String name)
Constructor creates a specified message digest function. |
|
AuthByDigest(java.lang.String name,
SharedSecret secret)
Constructor creates a specified message digest function. |
Method Summary | |
byte[] |
calculateResponse(int turn,
Challenge challenge)
Calculate response value for authentication. |
SharedSecret |
getSecret()
Gets the secret shared by each other. |
protected byte[] |
hash(int turn,
Challenge challenge)
Calculate hashed value for authentication. |
protected void |
setSecret(SharedSecret secret)
Sets the secret shared by each other. |
boolean |
verify(int turn,
Challenge challenge,
byte[] response)
Verify response value for authentication. |
boolean |
verify(int turn,
Challenge challenge,
ByteSequence response)
Verify response value for authentication. |
Methods inherited from class com.ibm.atp.auth.Auth |
addBytes, getDigestAlgorithm, getDigestValue, getFirstTurnIdentifier, getSecondTurnIdentifier, getTurnPad, resetDigest, setDigestAlgorithm, setFirstTurnIdentifier, setSecondTurnIdentifier |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AuthByDigest()
public AuthByDigest(SharedSecret secret)
secret
- secret shared by each otherprotected AuthByDigest(java.lang.String name)
name
- the name of message digest function algorithmpublic AuthByDigest(java.lang.String name, SharedSecret secret)
name
- the name of message digest function algorithmsecret
- secret shared by each otherMethod Detail |
public final byte[] calculateResponse(int turn, Challenge challenge) throws AuthenticationException
calculateResponse
in class Auth
turn
- of individualchallenge
- a challengeAuthenticationException
- byte sequence to be hased is invalidpublic SharedSecret getSecret()
protected final byte[] hash(int turn, Challenge challenge) throws AuthenticationException
hash
in class Auth
turn
- of individualchallenge
- a challengeAuthenticationException
- byte sequence to be hased is invalidprotected void setSecret(SharedSecret secret)
secret
- secret shared by each otherpublic boolean verify(int turn, Challenge challenge, byte[] response) throws AuthenticationException
verify
in class Auth
turn
- of individualchallenge
- a challengeresponse
- response value for authenticationAuthenticationException
- byte sequence for response is invalidpublic boolean verify(int turn, Challenge challenge, ByteSequence response) throws AuthenticationException
verify
in class Auth
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 |