# OfficePackageSecurityInspector

Inspects and validates Office package structure without executing active content.

Class 

`OfficeIMO`

**Namespace**

`OfficeIMO`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficePackageSecurityInspector.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Documents/OfficePackageSecurityInspector.cs#L13)

**Modifiers**

static

Inspects and validates Office package structure without executing active content.

## Inheritance

- object
- OfficePackageSecurityInspector

Filter members 

Show inherited

## Methods

Inspect 2 overloads

`public static OfficePackageSecurityReport Inspect(byte[] packageBytes, OfficePackageSecurityOptions? options = null)` [#](#method-inspect-byte-officeimo-officepackagesecurityoptions)

[OfficePackageSecurityInspector.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Documents/OfficePackageSecurityInspector.cs#L13)

Inspects package bytes using secure structural defaults.

Parameters

**packageBytes byte[] required**

**options OfficeIMO.OfficePackageSecurityOptions? = null optional**

Returns

`OfficePackageSecurityReport`

`public static OfficePackageSecurityReport Inspect(Stream source, OfficePackageSecurityOptions? options = null)` [#](#method-inspect-io-stream-officeimo-officepackagesecurityoptions)

[OfficePackageSecurityInspector.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Documents/OfficePackageSecurityInspector.cs#L46)

Reads and inspects a caller-owned stream while preserving its position when seekable.

Parameters

**source System.IO.Stream required**

**options OfficeIMO.OfficePackageSecurityOptions? = null optional**

Returns

`OfficePackageSecurityReport`

Validate 2 overloads

`public static OfficePackageSecurityReport Validate(byte[] packageBytes, OfficePackageSecurityOptions? options = null)` [#](#method-validate-byte-officeimo-officepackagesecurityoptions)

[OfficePackageSecurityInspector.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Documents/OfficePackageSecurityInspector.cs#L56)

Validates package bytes and throws a typed exception for the first rejected finding.

Parameters

**packageBytes byte[] required**

**options OfficeIMO.OfficePackageSecurityOptions? = null optional**

Returns

`OfficePackageSecurityReport`

`public static OfficePackageSecurityReport Validate(Stream source, OfficePackageSecurityOptions? options = null)` [#](#method-validate-io-stream-officeimo-officepackagesecurityoptions)

[OfficePackageSecurityInspector.cs:64](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Documents/OfficePackageSecurityInspector.cs#L64)

Reads and validates a caller-owned stream while preserving its position when seekable.

Parameters

**source System.IO.Stream required**

**options OfficeIMO.OfficePackageSecurityOptions? = null optional**

Returns

`OfficePackageSecurityReport`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:BB6DFF408F6E426451700E13DA48832306A155E401A669E4B96B27AD07E00DDC -->
