# OpcSecurityAlgorithm Enum

> Reference: Defines the different algorithms supported to describe the Uri of a specific OpcSecurityPolicy and through that the type of message encryption used by that security policy.

<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 the different algorithms supported to describe the [Uri](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/members#uri) of a specific [OpcSecurityPolicy](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/) and through that the type of message encryption used by that security policy.

## Syntax

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

```csharp
public enum OpcSecurityAlgorithm
```

</div>

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

```vbnet
Public Enum OpcSecurityAlgorithm
```

</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) → **OpcSecurityAlgorithm**

## Fields

| Name | Value | Description |
|---|---|---|
| <a id="aes128-sha256-rsaoaep"></a>`Aes128_Sha256_RsaOaep`<span class="api-meta">since v2.52</span> | `7` | TODO |
| <a id="aes256-sha256-rsapss"></a>`Aes256_Sha256_RsaPss`<span class="api-meta">since v2.52</span> | `8` | TODO |
| <a id="auto"></a>`Auto` | `0` | The [Algorithm](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/members#algorithm) and [Uri](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/members#uri) used by a [OpcSecurityPolicy](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/) is determined according to the [OpcSecurityMode](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritymode/) used: [None](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecurityalgorithm/#none) for the mode [None](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritymode/#none) and [Basic256Sha256](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecurityalgorithm/#basic256sha256) for the modes [Sign](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritymode/#sign) and [SignAndEncrypt](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritymode/#signandencrypt). The algorithms [Basic128Rsa15](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecurityalgorithm/#basic128rsa15) and [Basic256](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecurityalgorithm/#basic256) are deprecated by OPC 10000-7 and therefore only used if stated explicitly. |
| <a id="basic128rsa15"></a>`Basic128Rsa15` | `3` | The URI 'http://opcfoundation.org/UA/SecurityPolicy#Basic128Rsa15' is used by the [Uri](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/members#uri) of a [OpcSecurityPolicy](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/) and expresses the **use of (not longer secure) security** using RSA-15 as the key wrap algorithm and 128-bit Basic for message encryption. |
| <a id="basic256"></a>`Basic256` | `4` | The URI 'http://opcfoundation.org/UA/SecurityPolicy#Basic256' is used by the [Uri](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/members#uri) of a [OpcSecurityPolicy](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/) and expresses the **use of security** using 256-bit Basic for message encryption. |
| <a id="basic256sha256"></a>`Basic256Sha256` | `5` | The URI 'http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256' is used by the [Uri](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/members#uri) of a [OpcSecurityPolicy](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/) and expresses the **use of security** using SHA-256 for the signature digest and 256-bit Basic for message encryption. |
| <a id="custom"></a>`Custom` | `1` | The [Algorithm](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/members#algorithm) referred to by [Uri](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/members#uri) used by a [OpcSecurityPolicy](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/) does not refer to one of the OPC UA predefined security policies. |
| <a id="https"></a>`Https` | `6` | The URI 'http://opcfoundation.org/UA/SecurityPolicy#Https' is used by the [Uri](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/members#uri) of a [OpcSecurityPolicy](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/) and expresses the **use of security** using an encryption layer of SSL/TLS to protect messages. ATTENTION: This security algorithm is (not) yet supported by OPC UA. |
| <a id="none"></a>`None` | `2` | The URI 'http://opcfoundation.org/UA/SecurityPolicy#None' is used by the [Uri](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/members#uri) of a [OpcSecurityPolicy](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcsecuritypolicy/) and expresses that **no security** is to be used. |

## Applies to

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