Table of Contents

Class EncryptionInfoDescriptor

Namespace
DocWright.Cryptography
Assembly
DocWright.Cryptography.dll

The version header of an EncryptionInfo stream, which is what identifies the scheme ([MS-OFFCRYPTO] §2.3.4.5). The rest of the stream is scheme-specific and is parsed by the scheme's own reader.

public sealed class EncryptionInfoDescriptor
Inheritance
EncryptionInfoDescriptor
Inherited Members

Properties

Flags

Gets the encryption flags that follow the version pair.

IsSupported

Gets a value indicating whether DocWright can decrypt this scheme given the correct password.

The two ECMA-376 schemes only. The legacy RC4 and XOR schemes are identified by name — so a caller is told what the file is rather than that it is broken — but they are not decrypted, and claiming otherwise here would turn an honest refusal into a wrong-password error further down.

Payload

Gets the descriptor bytes after the eight-byte header: the agile XML descriptor, or the standard scheme's binary EncryptionHeader and EncryptionVerifier.

Scheme

Gets the scheme the version pair and flags identify.

SchemeDisplayName

Gets a human-readable name for Scheme, suitable for a diagnostic or an exception message. Contains no key material.

VersionMajor

Gets the major version from the descriptor header.

VersionMinor

Gets the minor version from the descriptor header.

Methods

DescribeScheme(OfficeEncryptionScheme)

Returns a human-readable name for a scheme.

Read(Stream)

Parses an EncryptionInfo stream's header and captures the scheme-specific remainder.