# OpcSecurityMode Enum

<dl class="api-definition">
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

Defines mechanisms to secure the message exchange.

## Syntax

<div class="api-signature" data-lang="csharp">

```csharp
public enum OpcSecurityMode
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Enum OpcSecurityMode
```

</div>

## Inheritance

[Object](https://learn.microsoft.com/dotnet/api/system.object) → [ValueType](https://learn.microsoft.com/dotnet/api/system.valuetype) → [Enum](https://learn.microsoft.com/dotnet/api/system.enum) → **OpcSecurityMode**

## Fields

| Name | Value | Description |
|---|---|---|
| <a id="invalid"></a>`Invalid` | `0` | Identifies invalid security configurations. |
| <a id="none"></a>`None` | `1` | The message exchange using a security policy with this mode is **not protected** through any security mechanism. |
| <a id="sign"></a>`Sign` | `2` | The message exchange using a security policy with this mode is **protected** through a signature. |
| <a id="signandencrypt"></a>`SignAndEncrypt` | `3` | The message exchange using a security policy with this mode is **protected** through a signature and encryption (see [OpcSecurityAlgorithm](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecurityalgorithm/)). |

## Applies to

| Package | Versions |
|---|---|
| Opc.UaFx.Advanced | v2.5–v2.59 |
