# OfficeManagedAesCryptographyProvider

Provides a portable managed AES-CBC implementation for hosts where the platform AES factory is unavailable.

Class 

`OfficeIMO.Security`

**Namespace**

`OfficeIMO.Security`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeManagedAesCryptographyProvider.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Security/OfficeManagedAesCryptographyProvider.cs#L23)

**Implements**

`IOfficeAesCryptographyProvider`

**Modifiers**

sealed

Provides a portable managed AES-CBC implementation for hosts where the platform AES factory is unavailable.

## Inheritance

- object
- OfficeManagedAesCryptographyProvider

## Remarks

The implementation supports 128-bit, 192-bit, and 256-bit AES keys with no padding or PKCS#7 padding. It is intended for compatibility hosts such as browser WebAssembly. Applications running on a platform with native AES support can leave the PDF provider unset and use the platform implementation.

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [OfficeManagedAesCryptographyProvider.Default](/api/core/officeimo-security-officemanagedaescryptographyprovider/#property-default)

Filter members 

Show inherited

## Constructors

`public OfficeManagedAesCryptographyProvider()` [#](#constructor-ctor)

## Methods

`public byte[] DecryptCbc(byte[] key, byte[] iv, byte[] input, OfficeAesPadding padding)` [#](#method-decryptcbc-byte-byte-byte-officeimo-security-officeaespadding)

[OfficeManagedAesCryptographyProvider.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Security/OfficeManagedAesCryptographyProvider.cs#L62)

Decrypts the supplied ciphertext using AES-CBC.

Parameters

**key byte[] required**

**iv byte[] required**

**input byte[] required**

**padding OfficeIMO.Security.OfficeAesPadding required**

Returns

`byte[]`

`public byte[] EncryptCbc(byte[] key, byte[] iv, byte[] input, OfficeAesPadding padding)` [#](#method-encryptcbc-byte-byte-byte-officeimo-security-officeaespadding)

[OfficeManagedAesCryptographyProvider.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Security/OfficeManagedAesCryptographyProvider.cs#L23)

Encrypts the supplied plaintext using AES-CBC.

Parameters

**key byte[] required**

**iv byte[] required**

**input byte[] required**

**padding OfficeIMO.Security.OfficeAesPadding required**

Returns

`byte[]`

## 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?`

## Properties

`public static OfficeManagedAesCryptographyProvider Default { get; }` [#](#property-default)

[OfficeManagedAesCryptographyProvider.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Security/OfficeManagedAesCryptographyProvider.cs#L16)

Gets the shared stateless provider instance.

`public string Name { get; }` [#](#property-name)

[OfficeManagedAesCryptographyProvider.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Security/OfficeManagedAesCryptographyProvider.cs#L19)

Gets a stable provider name for diagnostics.

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