title: How do you open encrypted OOXML document in C#?
body: <p>I want to open encrypted OOXML files, which are stored as streams inside a compound OLE file.  Microsoft has an API for OOXML, (<a href="http://msdn.microsoft.com/en-us/library/bb448854(office.14).aspx)" rel="nofollow noreferrer">OOXML Format SDK 2.0</a>, but it seems to lack a way to manipulate encrypted OOXML documents.  So, this breaks into two questions.</p>
  
  <ul>
  <li><p>How do you open compound OLE documents in C#?  I found this very similar question, (<a href="https://stackoverflow.com/questions/179128/reading-compound-documents-in-c">reading compound documents in C#</a>), but I was hoping that there might be a cleaner and more generic way of doing it that I missed.  </p></li>
  <li><p>Is there a high-level way to decrypt the <code>EncryptedPackage</code> stream within the OLE document?  The two best references I've found are <a href="http://www.lyquidity.com/devblog/?p=35" rel="nofollow noreferrer">Decrypting Office Documents</a> and <a href="http://www.codeplex.com/offcrypto" rel="nofollow noreferrer">MS-OFFCRYPTO Examples</a>.  "Decrypting Office Documents" seems to decrypt successfully, but it relies on an external DLL (<em>Lyquidity.OleStorage.dll</em>) to open the OLE document and did not work for me.  "MS-OFFCRYPTO Examples" has an example in C# to decrypt the stream but uses a C++ example to get the stream.  Both these references look like they work, but is there a higher level API that does the same thing?</p></li>
  </ul>