Share via


RSA.TryExportRSAPrivateKeyPem(Span<Char>, Int32) Método

Definición

Intenta exportar la clave actual en el formato PKCS#1 RSAPrivateKey codificado en PEM en un búfer proporcionado.

public:
 bool TryExportRSAPrivateKeyPem(Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryExportRSAPrivateKeyPem (Span<char> destination, out int charsWritten);
member this.TryExportRSAPrivateKeyPem : Span<char> * int -> bool
Public Function TryExportRSAPrivateKeyPem (destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean

Parámetros

destination
Span<Char>

Intervalo de caracteres para recibir los datos PKCS#1 RSAPrivateKey codificados en PEM.

charsWritten
Int32

Cuando este método devuelve , contiene un valor que indica el número de caracteres escritos en destination. Este parámetro se trata como sin inicializar.

Devoluciones

true si destination es lo suficientemente grande como para recibir la salida; en caso contrario, false.

Excepciones

No se ha podido exportar la clave.

Comentarios

Un PKCS#1 RSAPrivateKey codificado en PEM comenzará con -----BEGIN RSA PRIVATE KEY----- y finalizará con -----END RSA PRIVATE KEY-----, con el contenido de DER codificado en base64 de la clave entre los límites pem.

          The PEM is encoded according to the IETF RFC 7468 "strict"
          encoding rules.

Se aplica a