Пример #1
0
        public override void Authenticate(RfbSerializer serializer)
        {
            if (serializer == null)
            {
                throw new ArgumentNullException(nameof(serializer));
            }

            var challenge = serializer.ReadBytes(16);
            var b         = EncryptKey(_PasswordBytes, challenge);

            serializer.WriteBytes(b);
        }
Пример #2
0
        private void GetSecurityTypes()
        {
            if (ServerVersion == RfbVersions.v3_3)
            {
                var type = serializer.ReadUInt32();
                securityTypes = new byte[] { (byte)type };
            }
            else
            {
                var n = serializer.ReadByte();
                if (n == 0)
                {
                    throw new Exception();
                }

                securityTypes = serializer.ReadBytes(n);
            }
        }