Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.RdpbcgrDecoder.UpdateSecurityHeaderType C# (CSharp) Method

UpdateSecurityHeaderType() private method

For Standard Redirection PDU type, an encryption is needed. So if there's encryptionLevel is ENCRYPTION_LEVEL_LOW, update the securityHeaderType according to TD.
private UpdateSecurityHeaderType ( SecurityHeaderType &securityHeaderType ) : void
securityHeaderType SecurityHeaderType security header type
return void
        private void UpdateSecurityHeaderType(ref SecurityHeaderType securityHeaderType)
        {
            // Redirection PDU need to decrypt
            if (clientContext.RdpEncryptionLevel == EncryptionLevel.ENCRYPTION_LEVEL_LOW)
            {
                if (clientContext.RdpEncryptionMethod == EncryptionMethods.ENCRYPTION_METHOD_40BIT
                    || clientContext.RdpEncryptionMethod == EncryptionMethods.ENCRYPTION_METHOD_56BIT
                    || clientContext.RdpEncryptionMethod == EncryptionMethods.ENCRYPTION_METHOD_128BIT)
                {
                    securityHeaderType = SecurityHeaderType.NonFips;
                }
                else if (clientContext.RdpEncryptionMethod == EncryptionMethods.ENCRYPTION_METHOD_FIPS)
                {
                    securityHeaderType = SecurityHeaderType.Fips;
                }
                else
                {
                    securityHeaderType = SecurityHeaderType.None;
                }
            }
        }
RdpbcgrDecoder