public abstract class SRP6JavaClientSession extends Object
| Modifier and Type | Field and Description |
|---|---|
protected com.nimbusds.srp6.SRP6CryptoParams |
config
The crypto parameters for the SRP-6a protocol.
|
protected com.nimbusds.srp6.SRP6ClientSession |
session
The underlying Nimbus session which will be configure for JavaScript
interactions
|
| Constructor and Description |
|---|
SRP6JavaClientSession(com.nimbusds.srp6.SRP6CryptoParams srp6CryptoParams)
Constructs a Java client session compatible with the server session which
words with Java.
|
| Modifier and Type | Method and Description |
|---|---|
String |
generateRandomSalt(int numBytes)
Generates a salt value 's'.
|
void |
step1(String userID,
String password)
Records the identity 'I' and password 'P' of the authenticating user.
|
com.nimbusds.srp6.SRP6ClientCredentials |
step2(String s,
String B)
Receives the password salt 's' and public value 'B' from the server.
|
void |
step3(String M2)
Receives the server evidence message 'M1'.
|
protected final com.nimbusds.srp6.SRP6CryptoParams config
OpenSSLCryptoConfigprotected final com.nimbusds.srp6.SRP6ClientSession session
public SRP6JavaClientSession(com.nimbusds.srp6.SRP6CryptoParams srp6CryptoParams)
srp6CryptoParams - cryptographic constants which must match those being used by
the client.public void step1(String userID, String password)
SRP6ClientSession.State.STEP_1.
Argument origin:
userID - The identity 'I' of the authenticating user, UTF-8 encoded.
Must not be null or empty.password - The user password 'P', UTF-8 encoded. Must not be null
.IllegalStateException - If the method is invoked in a state other than
SRP6ClientSession.State.INIT.public com.nimbusds.srp6.SRP6ClientCredentials step2(String s, String B) throws com.nimbusds.srp6.SRP6Exception
SRP6ClientSession.State.STEP_2.
Argument origin:
s - The password salt 's'. Must not be null.B - The public server value 'B'. Must not be null.IllegalStateException - If the method is invoked in a state other than
SRP6ClientSession.State.STEP_1.com.nimbusds.srp6.SRP6Exception - If the session has timed out or the public server value 'B'
is invalid.public void step3(String M2) throws com.nimbusds.srp6.SRP6Exception
SRP6ClientSession.State.STEP_3.
Argument origin:
M2 - The server evidence message 'M2'. Must not be null.IllegalStateException - If the method is invoked in a state other than
SRP6ClientSession.State.STEP_2.com.nimbusds.srp6.SRP6Exception - If the session has timed out or the server evidence message
'M2' is invalid.public String generateRandomSalt(int numBytes)
numBytes - Number of random bytes. Recommended is greater than the bit
length of the chosen hash e.g. HASH_HEX_LENGTH constant of
server session is x2 hash length so a reasonable choice.Copyright © 2014. All Rights Reserved.