Method DecryptStreamInPlace
- Namespace
- DocWright.Cryptography
- Assembly
- DocWright.Cryptography.dll
DecryptStreamInPlace(byte[], int)
Decrypts one whole document stream in place.
public void DecryptStreamInPlace(byte[] buffer, int plaintextPrefixLength)
Parameters
bufferbyte[]The stream's bytes starting at stream offset zero. Decrypted in place.
plaintextPrefixLengthintThe number of leading bytes the producer left unencrypted — 68 for the
WordDocumentstream'sFibBase, the header length for the table stream, and zero forData. These bytes are not transformed, but the keystream still advances across them: the block cipher is positioned by absolute stream offset, not by how many bytes were actually enciphered.
Exceptions
- ArgumentNullException
bufferis null.- ArgumentOutOfRangeException
plaintextPrefixLengthis negative.