writeClearOrEncrypted method
Send a Binary Packet (e.g. KEX_INIT) that is initially sent in the clear, but encryped when keys are being renegotiated.
Implementation
void writeClearOrEncrypted(SSHMessage msg) {
if (state > SSHTransportState.FIRST_NEWKEYS) return writeCipher(msg);
sequenceNumberC2s++;
socket.sendRaw(msg.toBytes(null, random, encryptBlockSize));
if (tracePrint != null) {
tracePrint('$hostport: sent MSG id=${msg.id} in clear');
}
}