private DecryptFastPathInputData ( RdpbcgrServerSessionContext serverSessionContext, byte remainData, byte signatureData, bool isSalted ) : byte[] | ||
serverSessionContext | RdpbcgrServerSessionContext | |
remainData | byte | data to be decrypted |
signatureData | byte | signature data |
isSalted | bool | if the MAC signature was created by "salted MAC generation" |
Результат | byte[] |
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;
}
}