Пример #1
0
        // ================== Encyption ================

        void SetupEncryption()
        {
            if (!Connected)
            {
                return;
            }
#if SLEEPY_DEBUG
            RSAKeys = RSAEncryption.GenerateKeys(512);
#else
            RSAKeys = Sleepy.Security.RSAEncryption.GenerateKeys(2048);
#endif
            RSARegistration rsar = new RSARegistration(RSARegistration.Step.InitalRequest, new byte[0]);
            rawClient.Send(MessageUtil.Serialize(ref rsar)); // Kick off the Encrption Handshake
        }