// store password in client
client.setPassword(password);
// send authentication container
client.send(new AuthenticationRequest(userName, maxKeyLen));
context.progress();
client.waitForAuthentication();
// do transmission in an authenticated and encrypted context