Пример #1
0
        private void OnCMKey(object sender, PacketEventArgs args)
        {
            var cmkey = args.Packet as CMKeyC02;

            var encryption = new S2CEncryption();

            encryption.Initialize(MD5Hash.GetKey(cmkey.Key));
            Session.ServerState.Encryptor = encryption;
        }
        private void OnCMKey(object sender, PacketEventArgs args)
        {
            var cmkey = args.Packet as CMKeyC02;

            var encryption = new S2CEncryption();

            encryption.InitializeDec(ServerMD5Hash.GetKey(cmkey.Key));
            encryption.InitializeEnc(ClientMD5Hash.GetKey(cmkey.Key));
            Session.ServerState.Encryptor = encryption;

            Logger.Process("OnCMKey Server - " + BitConverter.ToString(ServerMD5Hash.GetKey(cmkey.Key)));
            Logger.Process("OnCMKey Client - " + BitConverter.ToString(ClientMD5Hash.GetKey(cmkey.Key)));
        }