sendPassword method

void sendPassword()

Sends MSG_USERAUTH_REQUEST with password pw.

Implementation

void sendPassword() {
  response(this, '\r\n');
  wrotePw = true;
  if (userauthFail != 0) {
    writeCipher(MSG_USERAUTH_REQUEST(
        login, 'ssh-connection', 'password', '', pw, Uint8List(0)));
  } else {
    List<Uint8List> prompt =
        List<Uint8List>.filled(passwordPrompts, Uint8List(0));
    prompt.last = pw;
    writeCipher(MSG_USERAUTH_INFO_RESPONSE(prompt));
  }
  passwordPrompts = 0;
  clearPassword();
}