How to call CryptMsg API in streaming mode - LargeCMS full sample

Hi all

Some time ago I posted a sample which shows how to sign large CMS data by calling CryptMsg API directly (How to call CryptMsg API in streaming mode (C#)) and that way overcome the current limitations of SignedCms in .NET ("ASN1 value too large" error when calling SignedCms.ComputeSignature).

I continued working on the sample and extended it quite a lot. Current version implements SignedLargeCMS and EnvelopedLargeCMS, my own version of SignedCms and EnvelopedCMS to work with large data. 

I already shared the p/invoke declarations I used (P/Invoking CryptoAPI in .NET. Part 2 (C#)), and you can find the full version of the sample at Codeplex.

I hope this helps.

Regards,

 

Alex (Alejandro Campos Magencio)