throw new RuntimeException("File object " + pFile
+ " exists but is not a file");
else if (!f.canRead() || !f.canWrite())
throw new RuntimeException("File " + pFile
+ " exists but is not accessible");
final PasswordFile tpasswd = new PasswordFile(pFile, p2File, cFile);
if (!tpasswd.contains(user))
{
final byte[] testSalt = new byte[10];
prng.nextBytes(testSalt);
tpasswd.add(user, password, testSalt, SRPRegistry.N_2048_BITS);
}
else
tpasswd.changePasswd(user, password);
final String[] entry = tpasswd.lookup(user, md);
final BigInteger v = new BigInteger(1, Util.fromBase64(entry[0]));
final byte[] salt = Util.fromBase64(entry[1]);
final String[] mpi = tpasswd.lookupConfig(entry[2]);
final BigInteger N = new BigInteger(1, Util.fromBase64(mpi[0]));
final BigInteger g = new BigInteger(1, Util.fromBase64(mpi[1]));
final IKeyPairGenerator kpg = new SRPKeyPairGenerator();
final HashMap attributes = new HashMap();