private byte[] DecryptFastPathInputData(RdpbcgrServerSessionContext serverSessionContext, byte[] remainData, byte[] signatureData, bool isSalted)
{
if (null == signatureData)
{
// No need to decrypt, return directly
return remainData;
}
else
{
// Decryption
byte[] decryptedData = null;
if (!serverSessionContext.ServerDecrypt(remainData, signatureData, isSalted, out decryptedData))
{
// Decryptioin failed
throw new FormatException(ConstValue.ERROR_MESSAGE_DECRYPTION_FAILED);
}
return decryptedData;
}
}