Class LegacyBinaryDecryptor
- Namespace
- DocWright.Cryptography
- Assembly
- DocWright.Cryptography.dll
Decrypts the streams of a legacy binary Office document — a Word 97-2003 .doc and
its siblings — which are encrypted stream by stream rather than as a single package.
public sealed class LegacyBinaryDecryptor
- Inheritance
-
LegacyBinaryDecryptor
- Inherited Members
Remarks
This is the counterpart to OfficeDecryptor, and the difference is structural
rather than algorithmic. An ECMA-376 encrypted file wraps one EncryptedPackage blob,
so decryption happens before any reader sees it. A legacy binary document is a
compound file whose WordDocument, 1Table/0Table and Data streams
are each encrypted in place, so decryption belongs inside the reader, which is why
this type exists rather than another overload of Decrypt(EncryptedOfficePackage, string?, ResourceLimits?, bool).
Read-only by design. DocWright writes agile encryption and nothing else; RC4 is broken and
producing it would be a disservice. See ARCHITECTURE.md.
Properties
- Scheme
Gets the scheme this instance decrypts.
- SchemeDisplayName
Gets a human-readable name for Scheme, suitable for a diagnostic. Contains no key material.
Methods
- DecryptStreamInPlace(byte[], int)
Decrypts one whole document stream in place.
- IdentifyScheme(byte[])
Identifies the scheme a legacy encryption header names, without deriving any key.
- Open(byte[], string?)
Reads a legacy encryption header and derives the decryption key for a password.