antiduh / nsspi

A C# / .Net interface to the Win32 SSPI authentication API
BSD 2-Clause "Simplified" License
64 stars 34 forks source link

Added option to encrypt/decrypt data without embedding buffer lengths #27

Open MarkMpn opened 2 years ago

MarkMpn commented 2 years ago

I'm using this library to create a .NET Core client for a WCF server using WS-Trust with SSPI authentication. The tokens generated by the WCF server contain data encrypted by SSPI but without the lengths of the individual buffers encoded in the output, as expected by this library.

In order to decrypt these tokens I've extended the Encrypt and Decrypt methods with extra overloads to handle data in this format.