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

DecryptFastPathUpdateData() private method

Decrypt Fast-path Update Data
private DecryptFastPathUpdateData ( byte remainData, byte signatureData, bool isSalted ) : byte[]
remainData byte data to be decrypted
signatureData byte signature data
isSalted bool if the MAC signature was created by "salted MAC generation"
return byte[]
        private byte[] DecryptFastPathUpdateData(byte[] remainData, byte[] signatureData, bool isSalted)
        {
            if (null == signatureData)
            {
                // No need to decrypt, return directly
                return remainData;
            }
            else
            {
                // Decryption
                byte[] decryptedData = null;
                if (!clientContext.Decrypt(remainData, signatureData, isSalted, out decryptedData))
                {
                    // Decryptioin failed
                    throw new FormatException(ConstValue.ERROR_MESSAGE_DECRYPTION_FAILED);
                }
                return decryptedData;
            }
        }
RdpbcgrDecoder