Ejemplo n.º 1
0
        /// <summary>
        ///     Initializes the encryption of client.
        /// </summary>
        internal void InitializeEncryption(string nonce)
        {
            RC4Encrypter sendEncrypter    = new RC4Encrypter(LogicMagicMessageFactory.RC4_KEY, nonce);
            RC4Encrypter receiveEncrypter = new RC4Encrypter(LogicMagicMessageFactory.RC4_KEY, nonce);

            this._messaging.SetEncrypters(sendEncrypter, receiveEncrypter);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Processes this instance.
        /// </summary>
        internal override void Process()
        {
            RC4Encrypter ReceiveEncrypter = (RC4Encrypter)this.Device.ReceiveEncrypter;
            RC4Encrypter SendEncrypter    = (RC4Encrypter)this.Device.SendEncrypter;

            string Nonce = Rjindael.ScrambleNonce((uint)this.Seed, this.Nonce);

            ReceiveEncrypter.Init(Factory.RC4Key + Nonce);
            SendEncrypter.Init(Factory.RC4Key + Nonce);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Sets the encrypters.
 /// </summary>
 internal void SetEncrypters()
 {
     this.Crypto = new RC4Encrypter(LogicLifeMessageFactory.RC4Key);
 }