code: public Buffer process(PacketOutputStream out, PacketInputStream in, AtomicInteger sequence) throws IOException {
      if (password == null || password.isEmpty()) {
        out.writeEmptyPacket(sequence.incrementAndGet());
      } else {
        try {
          out.startPacket(sequence.incrementAndGet());
          byte[] seed;
          if (authData.length > 0) {
            //Seed is ended with a null byte value.
            seed = Arrays.copyOfRange(authData, 0, authData.length - 1);
          } else {
            seed = new byte[0];
          }
          out.write(Utils.encryptPassword(password, seed, passwordCharacterEncoding));
          out.flush();
        } catch (NoSuchAlgorithmException e) {
          throw new RuntimeException("Could not use SHA-1, failing", e);
        }
      }
  
      Buffer buffer = in.getPacket(true);
      sequence.set(in.getLastPacketSeq());
      return buffer;
    }
docs: Process native password plugin authentication.
  see https://mariadb.com/kb/en/library/authentication-plugin-mysql_native_password/
  
  @param out       out stream
  @param in        in stream
  @param sequence  packet sequence
  @return response packet
  @throws IOException  if socket error