|
For the latest news and information visit The GNU Crypto project |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.crypto.sasl.srp.PasswordFile
The implementation of SRP password files.
For SRP, there are three (3) files:
This implementation assumes the following message digest algorithm codes:
IMPORTANT: This method computes the verifiers as described in RFC-2945, which differs from the description given on the web page for SRP-6.
Reference:
Constructor Summary | |
---|---|
PasswordFile()
|
|
PasswordFile(File pwFile)
|
|
PasswordFile(String pwName)
|
|
PasswordFile(String pwName,
String confName)
|
|
PasswordFile(String pwName,
String pw2Name,
String confName)
|
Method Summary | |
---|---|
void |
add(String user,
String passwd,
byte[] salt,
String index)
|
void |
changePasswd(String user,
String passwd)
|
boolean |
contains(String user)
|
boolean |
containsConfig(String index)
Checks if the current configuration file contains the <N, g> pair for the designated index . |
String[] |
lookup(String user,
String mdName)
Returns the triplet: verifier, salt and configuration file index, of a designated user, and a designated message digest algorithm name, as an array of strings. |
String[] |
lookupConfig(String index)
Returns a pair of strings representing the pair of N and
g MPIs for the designated index . |
void |
savePasswd()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PasswordFile() throws IOException
public PasswordFile(File pwFile) throws IOException
public PasswordFile(String pwName) throws IOException
public PasswordFile(String pwName, String confName) throws IOException
public PasswordFile(String pwName, String pw2Name, String confName) throws IOException
Method Detail |
public boolean containsConfig(String index) throws IOException
Checks if the current configuration file contains the <N, g> pair
for the designated index
.
index
- a string representing 1-digit identification of an <N, g>
pair used.
true
if the designated index
is that of
a known <N, g> pair, and false
otherwise.
IOException
- if an exception occurs during the process.SRPRegistry.N_2048_BITS
,
SRPRegistry.N_1536_BITS
,
SRPRegistry.N_1280_BITS
,
SRPRegistry.N_1024_BITS
,
SRPRegistry.N_768_BITS
,
SRPRegistry.N_640_BITS
,
SRPRegistry.N_512_BITS
public String[] lookupConfig(String index) throws IOException
Returns a pair of strings representing the pair of N
and
g
MPIs for the designated index
.
index
- a string representing 1-digit identification of an <N, g>
pair to look up.
N
, and the
second (at index position #1) is the representation of the MPI
g
. If the index
refers to an unknown pair, then
an empty string array is returned.
IOException
- if an exception occurs during the process.public boolean contains(String user) throws IOException
IOException
public void add(String user, String passwd, byte[] salt, String index) throws IOException
IOException
public void changePasswd(String user, String passwd) throws IOException
IOException
public void savePasswd() throws IOException
IOException
public String[] lookup(String user, String mdName) throws IOException
Returns the triplet: verifier, salt and configuration file index, of a designated user, and a designated message digest algorithm name, as an array of strings.
user
- the username.mdName
- the canonical name of the SRP's message digest algorithm.
IOException
|
For the latest news and information visit The GNU Crypto project |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |