public Buffer process ( PacketOutputStream out , PacketInputStream in , AtomicInteger sequence ) throws IOException { if ( password == null || password . isEmpty ( ) ) { out . writeEmptyPacket ( sequence . incrementAndGet ( ) ) ; } else { out . startPacket ( sequence . incrementAndGet ( ) ) ; byte [ ] bytePwd ; if ( passwordCharacterEncoding != null && ! passwordCharacterEncoding . isEmpty ( ) ) { bytePwd = password . getBytes ( passwordCharacterEncoding ) ; } else { bytePwd = password . getBytes ( ) ; } out . write ( bytePwd ) ; out . write ( 0 ) ; out . flush ( ) ; } Buffer buffer = in . getPacket ( true ) ; sequence . set ( in . getLastPacketSeq ( ) ) ; return buffer ; }
Send password in clear text to server .