Method IsEncryptedPackage
- Namespace
- DocWright.Cryptography
- Assembly
- DocWright.Cryptography.dll
IsEncryptedPackage(Stream)
Determines whether a stream is an encrypted Office package: a compound file carrying
both the EncryptionInfo and EncryptedPackage streams.
Requiring both is what keeps this from claiming an encrypted legacy
.doc, which is also a compound file but stores its content in
WordDocument and has no EncryptedPackage at all.
public static bool IsEncryptedPackage(Stream stream)
Parameters
streamStreamA seekable stream. Its position is restored before returning.
Returns
Exceptions
- ArgumentNullException
streamis null.- ArgumentException
streamis not seekable.