Esempio n. 1
0
        internal void CreateSshMsgKexDhGexRequestOld(int i_KeySize)
        {
            SshPacket = new SshPacket();
            SshPacket.PayLoad = new byte[sizeof(uint) + 1];

            SshPacket.PayLoad[0] = (byte)eSshMsgKexDhGex.SSH_MSG_KEX_DH_GEX_REQUEST_OLD;
            //m_Buffer[0] = (byte)eSshMsgKexDhGex.SSH_MSG_KEX_DH_GEX_INIT;

            // setting the enc key to i_KeySize bits
            SshPacket.PayLoad[1] = 0;
            SshPacket.PayLoad[2] = 0;
            SshPacket.PayLoad[3] = (byte)(i_KeySize / 256); // 0x10
            SshPacket.PayLoad[4] = 0;
        }
Esempio n. 2
0
        public KexPhasesManager()
        {
            ClientKexPacket = new SshKeyExchangePacket();
            ServerKexPacket = new SshKeyExchangePacket();

            SshPacket = new SshPacket();

            KexAlgorithem = string.Empty;

            m_Random = new Random();
        }