BigInteger N = new BigInteger(1, NByte);
BigInteger g = new BigInteger(1, gByte);
byte[] s = sByte;
BigInteger B = new BigInteger(1, BByte);
SRP6Client srpClient = new SRP6Client();
srpClient.init(N, g, new SHA1Digest(), random);
this.SRP_A = srpClient.generateClientCredentials(s, this.SRP_identity,
this.SRP_password);
try
{
BigInteger S = srpClient.calculateSecret(B);
this.pms = BigIntegers.asUnsignedByteArray(S);
}
catch (CryptoException e)
{
this.failWithError(AL_fatal, AP_illegal_parameter);