gnu.crypto.sasl.srp
public class PasswordFile extends Object
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:
Version: $Revision: 1.5 $
| 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 |
| 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 |
| void | savePasswd() |
Checks if the current configuration file contains the <N, g> pair
for the designated index.
Parameters: index a string representing 1-digit identification of an <N, g> pair used.
Returns: true if the designated index is that of
a known <N, g> pair, and false otherwise.
Throws: IOException if an exception occurs during the process.
See Also: N_2048_BITS N_1536_BITS N_1280_BITS N_1024_BITS N_768_BITS N_640_BITS N_512_BITS
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.
Parameters: user the username. mdName the canonical name of the SRP's message digest algorithm.
Returns: a string array containing, in this order, the BASE-64 encodings of the verifier, the salt and the index in the password configuration file of the MPIs N and g of the designated user.
Returns a pair of strings representing the pair of N and
g MPIs for the designated index.
Parameters: index a string representing 1-digit identification of an <N, g> pair to look up.
Returns: a pair of strings, arranged in an array, where the first (at index
position #0) is the repesentation of the MPI 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.
Throws: IOException if an exception occurs during the process.