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

# RSAPrivateKey

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

```csharp
public class RSAPrivateKey : PrivateKey, IPrivateKey
```

**Hierarquia:** [`object`](https://learn.microsoft.com/dotnet/api/system.object) → [`PrivateKey`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PrivateKey) → `RSAPrivateKey`

## Construtores

### `RSAPrivateKey(RSA)`

```csharp
public RSAPrivateKey(RSA rsa)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `rsa` | [`RSA`](https://learn.microsoft.com/dotnet/api/system.security.cryptography.rsa) |  |

---

### `RSAPrivateKey(RSAParameters)`

```csharp
public RSAPrivateKey(RSAParameters rsaParameters)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `rsaParameters` | [`RSAParameters`](https://learn.microsoft.com/dotnet/api/system.security.cryptography.rsaparameters) |  |

---

## Propriedades

### `Algorithm`

```csharp
public override PKAlgorithm Algorithm { get; }
```

**Retorno**

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

---

## Métodos

### `GetEncryptionCsp()`

```csharp
public override IEncryptionCsp GetEncryptionCsp()
```

**Retorno**

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

---

### `GetSignatureCsp(DigestAlgorithm)`

```csharp
public override ISignatureCsp GetSignatureCsp(DigestAlgorithm digestAlgorithm)
```

**Parâmetros**

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

**Retorno**

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

---

## Membros herdados

[`GetInstance(X509Certificate2)`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PrivateKey#getinstance-system-security-cryptography-x509certificates-x509certificate2), [`GetInstance(AsymmetricAlgorithm)`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PrivateKey#getinstance-system-security-cryptography-asymmetricalgorithm), [`Decode(string)`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PrivateKey#decode-system-string), [`Decode(string, string)`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PrivateKey#decode-system-string-system-string), [`Decode(byte[])`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PrivateKey#decode-system-byte), [`Decode(byte[], string)`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PrivateKey#decode-system-byte-system-string), [`Export()`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PrivateKey#export), [`ExportPem()`](https://docs.lacunasoftware.com/api/Lacuna.Pki/PrivateKey#exportpem), [`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)
