System.out.println("Found params for username: " + username);
SRPClientSession client = new SRPClientSession(username, password, params);
byte[] A = client.exponential();
byte[] B = server.init(username, A);
System.out.println("Sent A public key, got B public key");
byte[] M1 = client.response(B);
byte[] M2 = server.verify(username, M1);
System.out.println("Sent M1 challenge, got M2 challenge");
if (client.verify(M2) == false)
throw new SecurityException("Failed to validate server reply");
System.out.println("Validation successful");