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

# Csr

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

Represents a high level Certificate Signing Request (PKCS#10) object

```csharp
public class Csr
```

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

## Propriedades

### `EncodedValue`

The CSR in DER encoded format

```csharp
public byte[] EncodedValue { get; }
```

**Retorno**

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

---

### `SignatureAlgorithm`

CSR Signature algorithm used for the SignatureValue

```csharp
public SignatureAlgorithm SignatureAlgorithm { get; }
```

**Retorno**

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

---

### `SignatureValue`

CSR signature value

```csharp
public byte[] SignatureValue { get; }
```

**Retorno**

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

---

### `Subject`

CSR subject name

```csharp
public Name Subject { get; }
```

**Retorno**

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

---

### `SubjectPublicKey`

CSR public key

```csharp
public PublicKey SubjectPublicKey { get; }
```

**Retorno**

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

---

## Métodos

### `Decode(byte[])`

Decodes a CSR from a DER, PEM or DER Base64 encoded bytes

```csharp
public static Csr Decode(byte[] content)
```

**Parâmetros**

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

**Retorno**

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

---

### `Decode(string)`

Decodes a CSR from a PEM or DER Base64 encoded string

```csharp
public static Csr Decode(string content)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `content` | [`string`](https://learn.microsoft.com/dotnet/api/system.string) | PEM or DER Base64 encoded string |

**Retorno**

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

---

### `GetPemEncoded()`

Returns the CSR in PEM encoded format

```csharp
public string GetPemEncoded()
```

**Retorno**

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

---

### `Verify()`

Verifies if the CSR is valid

```csharp
public bool Verify()
```

**Retorno**

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

---

### `VerifyCertificate(PKCertificate)`

Verifies if a certificate corresponds to this CSR

```csharp
public bool VerifyCertificate(PKCertificate certificate)
```

**Parâmetros**

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

**Retorno**

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

---

## Membros herdados

[`ToString()`](https://learn.microsoft.com/dotnet/api/system.object.tostring), [`Equals(object)`](<https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)>), [`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), [`GetHashCode()`](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [`GetType()`](https://learn.microsoft.com/dotnet/api/system.object.gettype), [`MemberwiseClone()`](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)
