Method Open
- Namespace
- DocWright.Cryptography
- Assembly
- DocWright.Cryptography.dll
Open(byte[], string?)
Reads a legacy encryption header and derives the decryption key for a password.
public static LegacyBinaryDecryptor Open(byte[] header, string? password)
Parameters
headerbyte[]The encryption header from the start of the table stream. Its length is the FIB's
lKeyfor a Word document.passwordstringThe password, or null.
Returns
- LegacyBinaryDecryptor
A decryptor for the document's streams.
Exceptions
- ArgumentNullException
headeris null.- UnsupportedFeatureException
The header names a scheme DocWright does not decrypt.
- DocumentEncryptedException
passwordis null or empty.- InvalidPasswordException
The password does not match the header's verifier.
- InvalidDocumentException
The header is truncated or internally inconsistent.