---
title: "PKAlgorithm"
description: "Namespace: Lacuna.Pki"
canonical: "https://docs.lacunasoftware.com/api/Lacuna.Pki/PKAlgorithm"
locale: "pt-BR"
product: "PKI SDK"
last_updated: "2026-06-02"
---

# PKAlgorithm

**Namespace:** `Lacuna.Pki`  
**Assembly:** `Lacuna.Pki`  
_Class_

```csharp
public abstract class PKAlgorithm
```

**Hierarquia:** [`object`](https://learn.microsoft.com/dotnet/api/system.object) → `PKAlgorithm`

## Construtores

### `PKAlgorithm()`

```csharp
protected PKAlgorithm()
```

---

## Campos

### `DSA`

```csharp
public static readonly PKAlgorithm DSA
```

**Retorno**

[`PKAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKAlgorithm)

---

### `EC`

```csharp
public static readonly PKAlgorithm EC
```

**Retorno**

[`PKAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKAlgorithm)

---

### `RSA`

```csharp
public static readonly PKAlgorithm RSA
```

**Retorno**

[`PKAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKAlgorithm)

---

## Propriedades

### `Name`

```csharp
public abstract string Name { get; }
```

**Retorno**

[`string`](https://learn.microsoft.com/dotnet/api/system.string)

---

### `Oid`

```csharp
public abstract string Oid { get; }
```

**Retorno**

[`string`](https://learn.microsoft.com/dotnet/api/system.string)

---

## Métodos

### `Equals(object)`

```csharp
public override bool Equals(object obj)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `obj` | [`object`](https://learn.microsoft.com/dotnet/api/system.object) |  |

**Retorno**

[`bool`](https://learn.microsoft.com/dotnet/api/system.boolean)

---

### `Equals(PKAlgorithm)`

```csharp
public bool Equals(PKAlgorithm other)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `other` | [`PKAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKAlgorithm) |  |

**Retorno**

[`bool`](https://learn.microsoft.com/dotnet/api/system.boolean)

---

### `GetHashCode()`

```csharp
public override int GetHashCode()
```

**Retorno**

[`int`](https://learn.microsoft.com/dotnet/api/system.int32)

---

### `GetInstanceByName(string)`

```csharp
public static PKAlgorithm GetInstanceByName(string name)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `name` | [`string`](https://learn.microsoft.com/dotnet/api/system.string) |  |

**Retorno**

[`PKAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKAlgorithm)

---

### `GetInstanceByOID(string)`

```csharp
public static PKAlgorithm GetInstanceByOID(string oid)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `oid` | [`string`](https://learn.microsoft.com/dotnet/api/system.string) |  |

**Retorno**

[`PKAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKAlgorithm)

---

### `GetSignatureAlgorithm(DigestAlgorithm)`

```csharp
public abstract SignatureAlgorithm GetSignatureAlgorithm(DigestAlgorithm digestAlgorithm)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `digestAlgorithm` | [`DigestAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/DigestAlgorithm) |  |

**Retorno**

[`SignatureAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/SignatureAlgorithm)

---

## Operadores

### `operator !=(PKAlgorithm, PKAlgorithm)`

```csharp
public static bool operator !=(PKAlgorithm a, PKAlgorithm b)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `a` | [`PKAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKAlgorithm) |  |
| `b` | [`PKAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKAlgorithm) |  |

**Retorno**

[`bool`](https://learn.microsoft.com/dotnet/api/system.boolean)

---

### `operator ==(PKAlgorithm, PKAlgorithm)`

```csharp
public static bool operator ==(PKAlgorithm a, PKAlgorithm b)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `a` | [`PKAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKAlgorithm) |  |
| `b` | [`PKAlgorithm`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PKAlgorithm) |  |

**Retorno**

[`bool`](https://learn.microsoft.com/dotnet/api/system.boolean)

---

## Membros herdados

[`ToString()`](https://learn.microsoft.com/dotnet/api/system.object.tostring), [`Equals(object, object)`](<https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)>), [`ReferenceEquals(object, object)`](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [`GetType()`](https://learn.microsoft.com/dotnet/api/system.object.gettype), [`MemberwiseClone()`](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)
