Table of Contents

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

buffer byte[]

The stream's bytes starting at stream offset zero. Decrypted in place.

plaintextPrefixLength int

The number of leading bytes the producer left unencrypted — 68 for the WordDocument stream's FibBase, the header length for the table stream, and zero for Data. 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

buffer is null.

ArgumentOutOfRangeException

plaintextPrefixLength is negative.